|
|
Choosing A Webhost: |
Re: Portable WSAEWOULDBLOCK: msg#00219apache.apr.devel
On Wed, 29 Sep 2004 20:14:41 -0600, David Barrett <dbarrett@xxxxxxxxxxxx> wrote: > Sockets are coming along, but I can't find a portable way of distinguishing > between a failed or empty "apr_socket_recv( )" on a non-blocking socket. > Here's what I'm currently doing: > > # rv = apr_socket_recv( s, ... ); > # if( rv != APR_SUCCESS ) > # { > # if( rv == APR_EOF ) { > # // Graceful shutdown from other side > # } > # else if( APR_TO_OS_ERROR( rv ) == WSAEWOULDBLOCK ) { > # // No error, just no data use APR_STATUS_IS_EAGAIN(rv) to check for this condition the doc for the APR_SO_NONBLOCK socket option should mention that when this is enabled, send and recv functions will return such a status if the operation cannot be performed without blocking (or, change the doc for every send and recv function)
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | How to use the sockets library of apr?, Gaurav Gupta |
|---|---|
| Next by Date: | Re: How to use the sockets library of apr?, Jeff Trawick |
| Previous by Thread: | Portable WSAEWOULDBLOCK, David Barrett |
| Next by Thread: | [STATUS] (apr) Wed Sep 29 23:45:17 EDT 2004, Rodent of Unusual Size |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |