Gordon Scott wrote:
One technical note; I believe that I/O completion ports cannot handle
accept() type behaviour,

What do you mean by this?

With an IOCP, you can give the IOCP a *connected* socket and the IOCP will call you back when a read occurs.

But you cannot pass in an *unconnected* socket in the listen state, for the IOCP is not capable of calling you back when an incoming connection occurs and you need to call accept().

The docs say the following functions can be used with an IOCP;

ConnectNamedPipe
DeviceIoControl
LockFileEx
ReadDirectoryChangesW
ReadFile
TransactNamedPipe
WaitCommEvent
WriteFile

So, as you can see, it doesn't seem possible to use an IOCP to handle incoming connections.

FYI, libiocp 1.03 was put on the site last night. I'm going to add some example code next, and then maybe integrate the listen/accept solution I've written.
_______________________________________________
Libevent-users mailing list
Libevent-users@monkey.org
http://monkey.org/mailman/listinfo/libevent-users

Reply via email to