X-Git-Url: http://git.pk910.de/?p=TransparentIRC.git;a=blobdiff_plain;f=src%2FIOHandler.h;h=76fb2cf82c89dd492352ea622a12f416e8065785;hp=3e9e7053981ed8d045cfb459926c285a383bce73;hb=79b5ee62665a460214046003cdbe1b4b4f1fa39e;hpb=9d6d43ef738ec4ea700d1ab62bae892d69bede8a diff --git a/src/IOHandler.h b/src/IOHandler.h index 3e9e705..76fb2cf 100644 --- a/src/IOHandler.h +++ b/src/IOHandler.h @@ -57,7 +57,6 @@ struct IOBuffer { struct IODescriptor { int fd; - FILE *file; enum IOType type; enum IOStatus state; struct timeval timeout; @@ -81,8 +80,7 @@ struct IOEvent { } data; }; -struct IODescriptor *iohandler_add(int sockfd, enum IOType type, iohandler_callback *callback); -struct IODescriptor *iohandler_file(FILE *file, iohandler_callback *callback); +struct IODescriptor *iohandler_add(int sockfd, enum IOType type, struct timeval *timeout, iohandler_callback *callback); struct IODescriptor *iohandler_timer(struct timeval timeout, iohandler_callback *callback); struct IODescriptor *iohandler_connect(const char *hostname, unsigned int port, int ssl, const char *bind, iohandler_callback *callback); struct IODescriptor *iohandler_listen(const char *hostname, unsigned int port, int ssl, iohandler_callback *callback); @@ -91,6 +89,7 @@ void iohandler_send(struct IODescriptor *iofd, const char *data, size_t datalen) void iohandler_printf(struct IODescriptor *iofd, const char *text, ...); void iohandler_close(struct IODescriptor *iofd); void iohandler_update(struct IODescriptor *iofd); +void iohandler_set_timeout(struct IODescriptor *iofd, struct timeval *timeout); void iohandler_poll();