So, I've written an API to use IO completion ports. It's very simple - far easier than the framework necessary to handle multiple threads and WaitForMultipleObjects().
The API is; new_iocp() delete_iocp() add_socket() Currently, there's one callback function for all sockets. When the callback is called, an event type is indicated (successful read, failed read, socket closed), the number of bytes available is given and a pointer to user state is provided. Obviously, the user can keep track of the socket handle in his user state, but I'm thinking of having the socket being passed as an argument to the callback function, for convenience. Also, I think I'll change it so there is a callback function on a per socket basis. There's no delete_socket() function - it appears simply closing the socket handle removes it from the IO completion list. I need to seperate the code from my coding framework, so it can be intergrated into libevent. I also need to test with large numbers of sockets. I can do that locally, but I can't do that properly, I lack a second machine. _______________________________________________ Libevent-users mailing list Libevent-users@monkey.org http://monkey.org/mailman/listinfo/libevent-users