2004-06-08 23:54:24 +00:00
|
|
|
#ifndef fooiochannelhfoo
|
|
|
|
|
#define fooiochannelhfoo
|
|
|
|
|
|
|
|
|
|
#include <sys/types.h>
|
|
|
|
|
#include "mainloop.h"
|
|
|
|
|
|
|
|
|
|
struct iochannel;
|
|
|
|
|
|
|
|
|
|
struct iochannel* iochannel_new(struct mainloop*m, int ifd, int ofd);
|
|
|
|
|
void iochannel_free(struct iochannel*io);
|
|
|
|
|
|
|
|
|
|
ssize_t iochannel_write(struct iochannel*io, const void*data, size_t l);
|
|
|
|
|
ssize_t iochannel_read(struct iochannel*io, void*data, size_t l);
|
|
|
|
|
|
|
|
|
|
int iochannel_is_readable(struct iochannel*io);
|
|
|
|
|
int iochannel_is_writable(struct iochannel*io);
|
|
|
|
|
|
2004-06-19 19:27:47 +00:00
|
|
|
void iochannel_set_noclose(struct iochannel*io, int b);
|
|
|
|
|
|
2004-06-08 23:54:24 +00:00
|
|
|
void iochannel_set_callback(struct iochannel*io, void (*callback)(struct iochannel*io, void *userdata), void *userdata);
|
|
|
|
|
|
|
|
|
|
#endif
|