rbb 99/04/14 08:13:41
Modified: docs networkio.txt Log: update to apr_send and apr_recv. Also, a small re-order because I am addressing the moved functions next. Revision Changes Path 1.4 +43 -40 apache-apr/docs/networkio.txt Index: networkio.txt =================================================================== RCS file: /home/cvs/apache-apr/docs/networkio.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- networkio.txt 1999/04/14 14:02:06 1.3 +++ networkio.txt 1999/04/14 15:13:41 1.4 @@ -28,7 +28,7 @@ hopes that we may be able to close it later. If we free all the memory used, we can't even try to recover. - apr_int32_t apr_send(apr_socket_t *, const char *, apr_int32_t, time_t) + apr_ssize_t apr_send(apr_socket_t *, const char *, apr_int32_t, time_t) Sends a message over a socket Arguments: arg 1) Pointer to abstracted socket @@ -39,7 +39,7 @@ return) The number of bytes sent over the network. APR_FAILURE on failure. - apr_int32_t apr_recv(apr_socket_t, char *, apr_int32_t, time_t) + apr_ssize_t apr_recv(apr_socket_t, char *, apr_int32_t, time_t) Receive a message from a socket Arguments: arg 1) Pointer to abstracted socket @@ -47,6 +47,47 @@ arg 3) size of buf (in bytes) arg 4) time to wait for message from network, in seconds. return) Amount of data received in bytes + + APRStatus apr_setsocketoption(APRSocket, APRSocketOptionData); + Set options on the specified socket + Arguments: + arg 1) The abstracted socket to apply the options to + arg 2) The options to be applied. Or'ed together + APRStatus apr_poll(APRPollDesc, APRInt32, APRInt32, APRInt32) + Check an array of File Descriptors for specified events + Arguments: + arg 1) The file descriptors to look at. + arg 2) The number of file descriptors. + arg 3) amount of time in seconds to wait if no event has occured on + any of the file descriptors. 0 return immediately. -1 block + until an event occurs. For list of events and meanings, see + below under Events + arg 4) Number of file desriptors selected. 0 means call timed out. + -1 returned on failure. + APRStatus apr_bind(APRSocket, APRNetAddr *) + Assign an address to an unnamed port + Arguments: + arg 1) The file desc of the socket to bind. + arg 2) The structure pointing to address to bind to. + APRStatus apr_listen(APRSocket, APRUInt32) + Mark a socket as accepting connections and limit the size of the + listen queue. + Arguments: + arg 1) The file desc of the socket to mark + arg 2) The size of the listen queue. + APRStatus apr_accept(APRSocket, APRNetAddr *, APRSocket *) + extract first connection from listen queue, and sets up a new + connection on a new socket of the same type and family. It allocates + a new socket for that connection. + Arguments: + arg 1) The file desc of a socket that is listening. The connection + comes from this socket's listen queue. + arg 2) structure to store address of connecting socket. + arg 3) file descriptor of created socket. -1 on failure. + NOTE: accepted socket can not accept more connections. Original socket + remains open, and can accept more connections. + + APRStatus apr_initializenetaddr(APRNetAddrValue, APRUInt16, APRNetAddr); Initialize the fields of a APRNetAddr. assigning well known values @@ -113,44 +154,6 @@ Arguments: arg 1) the buffer to get the Internet address from arg 2) The structure to store the converted address into - APRStatus apr_setsocketoption(APRSocket, APRSocketOptionData); - Set options on the specified socket - Arguments: - arg 1) The abstracted socket to apply the options to - arg 2) The options to be applied. Or'ed together - APRStatus apr_poll(APRPollDesc, APRInt32, APRInt32, APRInt32) - Check an array of File Descriptors for specified events - Arguments: - arg 1) The file descriptors to look at. - arg 2) The number of file descriptors. - arg 3) amount of time in seconds to wait if no event has occured on - any of the file descriptors. 0 return immediately. -1 block - until an event occurs. For list of events and meanings, see - below under Events - arg 4) Number of file desriptors selected. 0 means call timed out. - -1 returned on failure. - APRStatus apr_bind(APRSocket, APRNetAddr *) - Assign an address to an unnamed port - Arguments: - arg 1) The file desc of the socket to bind. - arg 2) The structure pointing to address to bind to. - APRStatus apr_listen(APRSocket, APRUInt32) - Mark a socket as accepting connections and limit the size of the - listen queue. - Arguments: - arg 1) The file desc of the socket to mark - arg 2) The size of the listen queue. - APRStatus apr_accept(APRSocket, APRNetAddr *, APRSocket *) - extract first connection from listen queue, and sets up a new - connection on a new socket of the same type and family. It allocates - a new socket for that connection. - Arguments: - arg 1) The file desc of a socket that is listening. The connection - comes from this socket's listen queue. - arg 2) structure to store address of connecting socket. - arg 3) file descriptor of created socket. -1 on failure. - NOTE: accepted socket can not accept more connections. Original socket - remains open, and can accept more connections. APRStatus apr_getsockname(APRSocket, APRNetAddr *) retrieves the locally bound name of the specified socket. Arguments: