summaryrefslogtreecommitdiff
path: root/include/apr_network_io.h
diff options
context:
space:
mode:
authorJeff Trawick <trawick@apache.org>2004-09-30 17:47:06 +0000
committerJeff Trawick <trawick@apache.org>2004-09-30 17:47:06 +0000
commit8edd0139283cc2e3a4a0304014f18f820d3351b0 (patch)
tree66101a4566dae28867c42026404b2584a196b36b /include/apr_network_io.h
parent34ea568a4a7f0c8142c9f53113d3cf5563319604 (diff)
downloadapr-8edd0139283cc2e3a4a0304014f18f820d3351b0.tar.gz
add some hints about non-blocking sockets
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@65358 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/apr_network_io.h')
-rw-r--r--include/apr_network_io.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/include/apr_network_io.h b/include/apr_network_io.h
index b160b3f7f..0157a46b6 100644
--- a/include/apr_network_io.h
+++ b/include/apr_network_io.h
@@ -456,7 +456,8 @@ APR_DECLARE(apr_status_t) apr_socket_data_set(apr_socket_t *sock, void *data,
* @remark
* <PRE>
* This functions acts like a blocking write by default. To change
- * this behavior, use apr_socket_timeout_set().
+ * this behavior, use apr_socket_timeout_set() or the APR_SO_NONBLOCK
+ * socket option.
*
* It is possible for both bytes to be sent and an error to be returned.
*
@@ -475,7 +476,8 @@ APR_DECLARE(apr_status_t) apr_socket_send(apr_socket_t *sock, const char *buf,
* @remark
* <PRE>
* This functions acts like a blocking write by default. To change
- * this behavior, use apr_socket_timeout_set().
+ * this behavior, use apr_socket_timeout_set() or the APR_SO_NONBLOCK
+ * socket option.
* The number of bytes actually sent is stored in argument 3.
*
* It is possible for both bytes to be sent and an error to be returned.
@@ -526,7 +528,8 @@ APR_DECLARE(apr_status_t) apr_socket_recvfrom(apr_sockaddr_t *from,
* including headers, file, and trailers
* @param flags APR flags that are mapped to OS specific flags
* @remark This functions acts like a blocking write by default. To change
- * this behavior, use apr_socket_timeout_set().
+ * this behavior, use apr_socket_timeout_set() or the
+ * APR_SO_NONBLOCK socket option.
* The number of bytes actually sent is stored in argument 5.
*/
APR_DECLARE(apr_status_t) apr_socket_sendfile(apr_socket_t *sock,
@@ -547,8 +550,9 @@ APR_DECLARE(apr_status_t) apr_socket_sendfile(apr_socket_t *sock,
* @remark
* <PRE>
* This functions acts like a blocking read by default. To change
- * this behavior, use apr_socket_timeout_set().
- * The number of bytes actually sent is stored in argument 3.
+ * this behavior, use apr_socket_timeout_set() or the APR_SO_NONBLOCK
+ * socket option.
+ * The number of bytes actually received is stored in argument 3.
*
* It is possible for both bytes to be received and an APR_EOF or
* other error to be returned.
@@ -568,6 +572,11 @@ APR_DECLARE(apr_status_t) apr_socket_recv(apr_socket_t *sock,
* APR_SO_KEEPALIVE -- keep connections active
* APR_SO_LINGER -- lingers on close if data is present
* APR_SO_NONBLOCK -- Turns blocking on/off for socket
+ * When this option is enabled, use
+ * the APR_STATUS_IS_EAGAIN() macro to
+ * see if a send or receive function
+ * could not transfer data without
+ * blocking.
* APR_SO_REUSEADDR -- The rules used in validating addresses
* supplied to bind should allow reuse
* of local addresses.