Fixing socket reads
| From: | Sascha Schumann | Date: | Fri, 04 Oct 2002 13:48:28 +0000 |
| Subject: | Fixing socket reads | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-89004@lists.php.net to get a copy of this message | ||
The stream system assumes that the callee always wants to
consume *exactly* as much data as the callee is specifying.
This is not the case with sockets where read/recv specify the
*maximum* amount of data to read.
I've verified that PHP 4.3 behaves like earlier versions with
the attached patch. The current socket-over-streams
implementation fails to work in the default blocking case.
Wez, please let me know what you think about this patch.
- Sascha