Nick Mathewson wrote:
On Sat, Sep 23, 2006 at 04:51:57PM +0100, Toby Douglass wrote:
Is anyone working on implementing native-style (e.g. non-select()) waiting on Windows for socket events, as requested by Tor?

Actually, we (the Tor project) have got an undergraduate working on
one possible approach to it.  We'll let you know how it turns out.

I've got existing, debugged code, written in C, which offers a TCP server framework. There's a single thread which waits on an array of events associated with sockets. The API permits the addition and removal of ports to be listen upon (adding a port means the socket is created, an event associated with it, and the array of events passed to WaitForMultipleObjects() is reformed). When a connect occurs, a (per port) callback function is called, being passed the socket accept() returns.

I've downloaded the libevent code, but I've not looked at it yet. It's a bit awkward because it doesn't seem really to be for WIN32 at all and I'm not much of a UNIX programmer.
_______________________________________________
Libevent-users mailing list
Libevent-users@monkey.org
http://monkey.org/mailman/listinfo/libevent-users

Reply via email to