Rats... The third function API is actually this;
3. void socket_iocp_add_socket( void *socket_iocp_state, SOCKET socket, void *user_state, size_t read_buffer_size, void (*callback_function)(SOCKET socket, int event_type, void *read_buffer, DWORD byte_count, void *user_state) ); Note the change to the first arguments of the callback function - I accidentally left in my own framework stuff. The event types are; #define SOCKET_IOCP_SOCKET_RECV_SUCCESS 1 #define SOCKET_IOCP_SOCKET_LOCAL_CLOSE 2 #define SOCKET_IOCP_SOCKET_REMOTE_CLOSE 3 The user, in his callback function, is expected to switch on the event type and behaviour accordingly. He has access to the socket and his own user state through the arguments to the callback. _______________________________________________ Libevent-users mailing list Libevent-users@monkey.org http://monkey.org/mailman/listinfo/libevent-users