[Libevent-users] Win32 I/O completion ports code release

2006-12-03 Thread Toby Douglass
Hi. I've written a tiny library which provides a simple front end for IO completion ports. The ultimate purpose of this is to provide excellent socket handling under Win32 in libevent so that the socket problem Tor faces is solved. My code base is written around a resource and error handling fr

Re: [Libevent-users] Win32 I/O completion ports code release

2006-12-04 Thread Gordon Scott
very cool. One technical note; I believe that I/O completion ports cannot handle accept() type behaviour, What do you mean by this? ___ Libevent-users mailing list Libevent-users@monkey.org http://monkey.org/mailman/listinfo/libevent-users

Re: [Libevent-users] Win32 I/O completion ports code release

2006-12-05 Thread Toby Douglass
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*

Re: [Libevent-users] Win32 I/O completion ports code release

2006-12-05 Thread Kevin Sanders
On 12/5/06, Toby Douglass <[EMAIL PROTECTED]> wrote: 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 w

Re: [Libevent-users] Win32 I/O completion ports code release

2006-12-05 Thread Toby Douglass
>> The docs say the following functions can be used with an IOCP; >> >> ConnectNamedPipe >> DeviceIoControl >> LockFileEx >> ReadDirectoryChangesW >> ReadFile >> TransactNamedPipe >> WaitCommEvent >> WriteFile > Use AcceptEx. The docs sayeth; "The following functions can be used to start I/O ope

Re: [Libevent-users] Win32 I/O completion ports code release

2006-12-05 Thread Toby Douglass
Kevin Sanders wrote: > Use AcceptEx. Interesting. In the AcceptEx() docs, we find this; "As with all overlapped Windows functions, either Windows events or completion ports can be used as a completion notification mechanism." ___ Libevent-users maili

Re: [Libevent-users] Win32 I/O completion ports code release

2006-12-05 Thread Kevin Sanders
On 12/5/06, Toby Douglass <[EMAIL PROTECTED]> wrote: >> The docs say the following functions can be used with an IOCP; >> >> ConnectNamedPipe >> DeviceIoControl >> LockFileEx >> ReadDirectoryChangesW >> ReadFile >> TransactNamedPipe >> WaitCommEvent >> WriteFile > Use AcceptEx. The docs sayeth;

Re: [Libevent-users] Win32 I/O completion ports code release

2006-12-05 Thread Gordon Scott
AcceptEx works great. THe cool thing is that you can pre-create a pool of sockets waiting for connection. When a socket is connected you'll get an event from GQCS call. Typically I create about 20 at a time..when I get down to about 5 or so remaining I use AcceptEx to queue up another batch of s

Re: [Libevent-users] Win32 I/O completion ports code release

2006-12-05 Thread Gordon Scott
You might want to do some research on IOCP outside of MSDN. Codeproject has a number of IOCP server samples you can look at While the docs may say that those files you mention CAN be used with IOCP, they are by no means the ONLY functions that can be used. For example my server users AcceptEx f

Re: [Libevent-users] Win32 I/O completion ports code release

2006-12-05 Thread Kevin Sanders
On 12/5/06, Gordon Scott <[EMAIL PROTECTED]> wrote: You might want to do some research on IOCP outside of MSDN. Codeproject has a number of IOCP server samples you can look at While the docs may say that those files you mention CAN be used with IOCP, they are by no means the ONLY functions that