X-Git-Url: http://git.pk910.de/?p=NeonServV5.git;a=blobdiff_plain;f=src%2FIOHandler.h;h=eb32cdc71ab345ca8961e4e411b72acfa8064cef;hp=72e270502d3b48ea9a2d2103dc7138e872bb7ff7;hb=f83bd22fe2dcb3ca0ddb9321944ee0b9c9b61ea6;hpb=57b28c464a3cd3eee7d91ddf9d9fc83fae1c58f6 diff --git a/src/IOHandler.h b/src/IOHandler.h index 72e2705..eb32cdc 100644 --- a/src/IOHandler.h +++ b/src/IOHandler.h @@ -82,6 +82,7 @@ struct IODescriptor { enum IOType type; enum IOStatus state; struct timeval timeout; + int constant_timeout; iohandler_callback *callback; struct IOBuffer readbuf; struct IOBuffer writebuf; @@ -114,8 +115,13 @@ struct IOEvent { #define IOHANDLER_CONNECT_IPV4 0x01 #define IOHANDLER_CONNECT_IPV6 0x02 /* overrides IOHANDLER_CONNECT_IPV4 */ +#define IOHANDLER_SETTING_HIGH_PRECISION_TIMER 0x01 + +void iohandler_set(int setting, int value); + 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_constant_timer(int msec, iohandler_callback *callback); struct IODescriptor *iohandler_connect(const char *hostname, unsigned int port, int ssl, const char *bind, iohandler_callback *callback); struct IODescriptor *iohandler_connect_flags(const char *hostname, unsigned int port, int ssl, const char *bindhost, iohandler_callback *callback, int flags); struct IODescriptor *iohandler_listen(const char *hostname, unsigned int port, iohandler_callback *callback);