#include <cat/cat.h>
const cat_iohandler *catnet_iohandler(int *error);
On error, the function returns NULL and the error code is stored in *error if that argument is non-NULL. The catnet_iohandler function is not likely to fail once cat_init() has been called.
All other catnet_ functions expect this I/O handler to be installed in the given session. In the event that no I/O handler or another I/O handler is installed, a negative error code will be returned in error.
cat_session *sess;
sess = cat_newsession(); cat_installiohandler(sess, catnet_iohandler(NULL), NULL);