This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]