From 6704956ba55c270be5ba5d3af1cfdb23afdc6005 Mon Sep 17 00:00:00 2001 From: Gwynne Raskind Date: Mon, 25 Jun 2007 19:40:11 +0000 Subject: [PATCH] Fix several entity and tag errors, fix WS, fix grammar and spelling. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@238569 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../sockets/functions/socket-recvfrom.xml | 86 ++++++++++--------- 1 file changed, 47 insertions(+), 39 deletions(-) diff --git a/reference/sockets/functions/socket-recvfrom.xml b/reference/sockets/functions/socket-recvfrom.xml index e58770dac0..5ccaa269e3 100644 --- a/reference/sockets/functions/socket-recvfrom.xml +++ b/reference/sockets/functions/socket-recvfrom.xml @@ -1,5 +1,5 @@ - + socket_recvfrom @@ -18,20 +18,24 @@ intport - The socket_recvfrom function receives len - bytes of data in buf from name on port - port (if socket is not of AF_UNIX type) using - socket. socket_recvfrom can be used to - gather data from either a connected or an unconnected socket. Additionally, one or more - flags can be specified to modify the behaviour of the function. + The socket_recvfrom function receives + len bytes of data in buf from + name on port port (if the + socket is not of type AF_UNIX) using + socket. socket_recvfrom can be + used to gather data from both connected and unconnected sockets. + Additionally, one or more flags can be specified to modify the behaviour of + the function. - The name and port must be passed as a - reference. If the socket is not connection-oriented, name will - be set to the internet protocol address of the remote host or the path to the UNIX - socket. If the socket is connection-oriented, name is &null. - Additionnally, the port will contain the port of the - remote host in the case of a not connection-oriented AF_INET or AF_INET6 socket. + The name and port must be + passed by reference. If the socket is not connection-oriented, + name will be set to the internet protocol address of + the remote host or the path to the UNIX socket. If the socket is + connection-oriented, name is &null;. Additionally, + the port will contain the port of the remote host in + the case of an unconnected AF_INET or + AF_INET6 socket. @@ -43,7 +47,8 @@ socket - The socket must be a socket resource previously created with socket_create(). + The socket must be a socket resource previously + created by socket_create(). @@ -52,7 +57,8 @@ buf - The data received will be fetched to the variable specified with buf. + The data received will be fetched to the variable specified with + buf. @@ -70,9 +76,9 @@ flags - The following table contains the different flags that can be set using the - flags parameter. Use the OR logic operator to use more - than one flag. + The following table contains the different flags that can be set using + the flags parameter. Use the OR logic operator + (|) to use more than one flag. @@ -88,29 +94,29 @@ MSG_OOB - Receive out-of-band data. + Receive out-of-band data. MSG_PEEK - Receive data from the beginning of the receive queue without removing - it from the queue. + Receive data from the beginning of the receive queue without + removing it from the queue. MSG_WAITALL - Block until at least len are received. However, - if a signal is caught or the remote host disconnects, the function - may return less data. + Block until at least len are received. + However, if a signal is caught or the remote host disconnects, the + function may return less data. MSG_DONTWAIT - With this flag set, the function returns even if it would normally have - blocked. + With this flag set, the function returns even if it would normally + have blocked. @@ -123,9 +129,10 @@ name - If the socket is of AF_UNIX type, name is the path to the - file. Else, in the case of non-connection oriented socket name - is the IP address of the remote host and &null if the socket is connection oriented. + If the socket is of the type AF_UNIX type, + name is the path to the file. Else, for + unconnected sockets, name is the IP address of, + the remote host, or &null; if the socket is connection-oriented. @@ -134,9 +141,10 @@ port - This argument only applies to AF_INET and AF_INET6 sockets and specifies the - remote port from which the data is received. If the socket is connection - oriented, port will be &null. + This argument only applies to AF_INET and + AF_INET6 sockets, and specifies the remote port + from which the data is received. If the socket is connection-oriented, + port will be &null;. @@ -148,11 +156,11 @@ &reftitle.returnvalues; - socket_recvfrom returns the number of bytes received + socket_recvfrom returns the number of bytes received, or -1 if there was an error. The actual error code can be retrieved by - calling socket_last_error. This error code may be passed - to socket_strerror to get a textual explanation of the - error. + calling socket_last_error. This error code may be + passed to socket_strerror to get a textual explanation + of the error. @@ -177,9 +185,9 @@ echo "Received data: $buf"; ]]> - This will example will initiate a TCP connection to 127.0.0.1 on port 1223 - and print at most 12 characters received from the remote host or block - until no data is received. + This example will initiate a TCP connection to 127.0.0.1 on port 1223 and + print at most 12 characters received from the remote host or block until + data is received.