From 86653c5a0a6cac3ae6618b42cb6680f1d7bef8b8 Mon Sep 17 00:00:00 2001 From: foobar Date: Sun, 3 Jun 2001 01:20:11 +0000 Subject: [PATCH] Added documentation for the optional 4th parameter for sockets read() func. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@49120 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/sockets.xml | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/functions/sockets.xml b/functions/sockets.xml index 2db2b250ba..669090066d 100644 --- a/functions/sockets.xml +++ b/functions/sockets.xml @@ -408,18 +408,39 @@ echo "OK.\n\n"; int read int socket_des - string &buffer + string buffer int length + int type The function read reads from socket socket_descreated by the accept_connect function into - &buffer the number of bytes set by + 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. + + Optional type parameter is a named constant: + + + + PHP_READ_SYSTEM - use the system read() + + + + + PHP_READ_BINARY - binary safe read() (same as PHP_READ_SYSTEM) + + + + + PHP_READ_NORMAL - Default. Reading stops at \n or \r. + + + + See also accept_connect,