apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@attglobal.net>
Subject Re: [PATCH] sockets.c
Date Mon, 06 Aug 2001 21:22:17 GMT
barbee@veribox.net writes:

> There shouldn't be a reason to call connect again in the chunk
> below since apr_wait_io_or_timeout should return success if we can
> use the socket or error if we've timeout.

The purpose of the connect call is to find out whether or we have a
connection.  It is much better to find an error (e.g., ECONNREFUSED)
here than have a subsequent read or write fail.  Applications don't
tend to have as friendly an error path when send or recv fail as they
do when connect fails since a connect failure is normal behavior (user
specified bad input).

Jeff Trawick | trawick@attglobal.net | PGP public key at web site:
             Born in Roswell... married an alien...

View raw message