note 32449 added to function.socket-read

From: Date: Wed, 28 May 2003 03:19:57 +0000
Subject: note 32449 added to function.socket-read
Groups: php.notes 
Request: Send a blank email to php-notes+get-49149@lists.php.net to get a copy of this message
Something has changed with socket_read sometime between 4.3.0 and the May 14, 2003 build of 5.0.0-dev. (Feel free to correct me on when exactly the change occured, or if the change was repaired in a dev version after May 14). In the older versions, PHP_NORMAL_READ would pull the \r or \n that ended the read out of the socket along with the rest of the string. In the 5.0.0-dev that I have, however, it seems to pull the \r, but not the \n. Therefore, the \n stays in the socket buffer, so subsequent calls to socket_read with PHP_NORMAL_READ will just pull out empty strings. Creative use of socket_read($socket, 1) can work around this. ---- Manual Page -- http://www.php.net/manual/en/function.socket-read.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+32449 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+32449&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+32449&report=yes

« previous php.notes (#49149) next »