From 3d2dbe6962e72d866872e98125d668514d1f8221 Mon Sep 17 00:00:00 2001 From: Ron Chmara Date: Thu, 2 Nov 2000 08:14:12 +0000 Subject: [PATCH] adding functions git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@35036 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/sockets.xml | 70 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) 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. + + + +