From: pk910 Date: Mon, 17 Dec 2012 17:34:01 +0000 (+0100) Subject: Merge remote-tracking branch 'IOMultiplexer.git/master' into development X-Git-Url: http://git.pk910.de/?a=commitdiff_plain;ds=sidebyside;h=259cd63d66c9870dc57aac7c34ef9b2033d9daf0;hp=-c;p=NeonServV5.git Merge remote-tracking branch 'IOMultiplexer.git/master' into development --- 259cd63d66c9870dc57aac7c34ef9b2033d9daf0 diff --combined src/IOHandler.h index 9542985,eb32cdc..82781d6 --- a/src/IOHandler.h +++ b/src/IOHandler.h @@@ -16,7 -16,6 +16,7 @@@ */ #ifndef _IOHandler_h #define _IOHandler_h +#include "../config.h" /* configure script autogenerated */ #include #include /* struct timeval */ @@@ -83,6 -82,7 +83,7 @@@ struct IODescriptor enum IOType type; enum IOStatus state; struct timeval timeout; + int constant_timeout; iohandler_callback *callback; struct IOBuffer readbuf; struct IOBuffer writebuf; @@@ -115,8 -115,13 +116,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);