diff --git a/functions/sockets.xml b/functions/sockets.xml index cba417f7d4..2db2b250ba 100644 --- a/functions/sockets.xml +++ b/functions/sockets.xml @@ -397,6 +397,42 @@ echo "OK.\n\n"; + + + read + Read from a socket + + + Description + + + int read + int socket_des + string &buffer + int length + + + + The function read reads from socket + socket_descreated by the + accept_connect function into + &buffer the number of bytes set by + length. Otherwise you can use \n, \t or \0 to + end reading. Returns number of bytes that have been read. + + + See also + accept_connect, + bind, + connect, + listen, + strerror, + socket_get_status. and + write. + + + + socket @@ -513,6 +549,40 @@ if (($ret = bind ($socket, '127.0.0.1', 80)) < 0) { + + + write + Write to a socket + + + Description + + + int write + int socket_des + string &buffer + int length + + + + The function write writes to the socket + socket_des from + &buffer the number of bytes set by + length. + + + See also + accept_connect, + bind, + connect, + listen, + read, + strerror, and + socket_get_status. + + + +