Sockets (reading)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi.

During a socket read, why would all the requested number of bytes not get sent? For example, I request 1000 bytes:

<?php
$data = @socket_read ($socket, 2048, PHP_BINARY_READ);
?>

This is actually in a loop, so I can get all the data if split up. So, for example, here's how the data split up in 3 iterations (for 1000 bytes):

650 bytes
200 bytes
150 bytes

But if I can accept up to 2048 bytes per socket read, why would it not pull all 1000 bytes initially in 1 step? Any thoughts on this would be greatly appreciated!

Thanks,
~Philip

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux