[PATCH] interruptable accept

Thomas Pfaff tpfaff@gmx.net
Mon Jul 1 05:22:00 GMT 2002



On Mon, 1 Jul 2002, Corinna Vinschen wrote:

> On Mon, Jul 01, 2002 at 01:59:56PM +0200, Thomas Pfaff wrote:
> > To be corect:
> > 1. Call WSAEventSelect.
> > 2. WSAWaitForMultipleObjects for socket and signal_arrived.
> > 3. If signal arrived set EINTR, WSAEnumNetworkEvents otherwise.
> > 4. do accept, then switch sockets back to nonblocking
> >
> > I will generate a new patch tonight, then you can decide which one to use.
> > The select one was easier one to implement because you don't have to
> > deal with nonblocking I/O and multiple events.
>
> If that helps, look into net.cc, wsock_event::wait().  It's doing
> something similar for send/recv.

I have already checked, but this for overlapped I/O and can't be used
with accept. In a first step i will put all that stuff into the accept
call, then you can decide whether it make sense to create new methods.

Thomas



More information about the Cygwin-patches mailing list