Home » Networking » Net_Socket » Bug #1667
read() doesn't return if less than the maximum size is available
Details
| Submitted | 2004-06-17 13:28 UTC |
|---|---|
| From | jellybob at php dot net |
| Status | Bogus |
| Package | Net_Socket |
| PHP Version | 5.0.0RC3 (Release Candidate 3) |
| OS | Windows XP |
| Roadmaps | (Not assigned) |
Comments
[2004-06-17 13:28 UTC] jellybob at php dot net
Description:
------------
When attempting to use the read method with a specific size the method doesn't return unless at least that size is available, while in the documentation it is listed as being the *maximum* ammount of data to return, which appears to say that if less than that ammount is available, that will be returned instead.
Reproduce code:
---------------
[client]
$socket->send('echo');
$socket->receive(4096);
[server]
Sends back the send data (echo), which is less than 4096.
Expected result:
----------------
The 4 bytes of data available is returned.
Actual result:
--------------
No data is returned, and the socket blocks.