apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <...@covalent.net>
Subject Re: [PATCH] make socket timeouts work reasonably for connect()
Date Tue, 10 Jul 2001 17:18:38 GMT
On Tue, 10 Jul 2001, Cliff Woolley wrote:

>
> > > (Unix at least; Win32 connect is a mess for non-blocking/timed-out
> > > sockets... it looks to me that we wait forever; I could be confused
> > > though :) )
> > >
> > > concerns?
> > >
> > > old behavior on Unix:
> > >
> > > if timeout is set on socket before apr_connect() and connect takes a
> > > while (normal for TCP), apr_connect() returns EINPROGRESS and app must
> > > handle any timeout
> > >
> > > new behavior on Unix:
> > >
> > > if timeout is set on socket before apr_connect(), app will see
> > > APR_ETIMEUP if it takes longer than the timeout
>
> +1
>
> (apr_wait_for_io_or_timeout() might want a better name if it's going
> public, but that's just a nit)

Even better, if apr_wait_for_io_or_timeout is going public, we can replace
all the duplicate code in the file_io section.  :-)

I would probably recommend moving the function to the misc/ portion of
APR, so that File_io doesn't rely on network_io, but that is just a
preference.

Ryan

_____________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
Covalent Technologies			rbb@covalent.net
-----------------------------------------------------------------------------


Mime
View raw message