This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
Re: [PATCH] interruptable accept
- From: Thomas Pfaff <tpfaff at gmx dot net>
- To: Corinna Vinschen <cygwin-patches at cygwin dot com>
- Date: Mon, 1 Jul 2002 14:22:36 +0200 (Westeuropäische Sommerzeit)
- Subject: Re: [PATCH] interruptable accept
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