On 6/24/05, Paul Querna <[EMAIL PROTECTED]> wrote:

> I would like to look at extending the timeout API, creating a new
> version that leaves a socket in its original state (blocking or
> non-blocking), but still implements the Timeouts.  The SO_SNDTIMEO and
> O_RCVTIMEO socketopts can do exactly this.  For platforms that do not
> support them, we can emulate it but toggling to non-blocking, and using
> apr_wait_for_io_or_timeout, just like we do now, and then reseting the
> socket to its original state.

Why do you need a different timeout API?  It either works or it
doesn't.  Provide an implementation of send*/receive*/sockopt APIs
that can use SO_SNDTIMEO/O_RCVTIMEO, and enable it carefully.

> Is there any reason SO_SNDTIMEO and SO_RCVTIMEO can't be used?

As far as I recall, it was just the lack of portability even among
Unix-ish platforms.  ifdef SO_SNDTIMEO probably isn't a good-enough
check for availability.

Reply via email to