X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=src%2FIOHandler.h;h=76fb2cf82c89dd492352ea622a12f416e8065785;hb=79b5ee62665a460214046003cdbe1b4b4f1fa39e;hp=7d33ce23f9ee070b37be8129e8e0acd5863290bc;hpb=1f2baa2e7b90ea83c5a0c93598e22e5063fc6d95;p=TransparentIRC.git diff --git a/src/IOHandler.h b/src/IOHandler.h index 7d33ce2..76fb2cf 100644 --- a/src/IOHandler.h +++ b/src/IOHandler.h @@ -65,6 +65,7 @@ struct IODescriptor { struct IOBuffer writebuf; void *data; int read_lines : 1; + int ssl : 1; struct IODescriptor *next, *prev; }; @@ -79,15 +80,16 @@ struct IOEvent { } data; }; -struct IODescriptor *iohandler_add(int sockfd, enum IOType type, 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, const char *bind, iohandler_callback *callback); -struct IODescriptor *iohandler_listen(const char *hostname, unsigned int port, 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); void iohandler_write(struct IODescriptor *iofd, const char *line); 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();