socket_get_status()
| From: | Richard Heyes | Date: | Sun, 30 Sep 2001 23:12:56 +0000 |
| Subject: | socket_get_status() | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-69395@lists.php.net to get a copy of this message | ||
Hi,
Exactly what does the unread_bytes parameter of the return of
socket_get_status() mean? I thought it would be the amount of data waiting
to be gotten via fgets() or fread(), but not according to my lil' test
(interactive mode):
<?php
$fp = fsockopen('10.1.1.2', 25);
var_dump(socket_get_status($fp));
array(4) {
["timed_out"]=>
bool(false)
["blocked"]=>
bool(true)
["eof"]=>
bool(false)
["unread_bytes"]=>
int(0)
}
echo fgets($fp, 512);
220 heyes-computing.net Ready for action (Mailtraq 1.1.5.1167/SMTP)
--
Richard Heyes
"I know not with what weapons World War III will be fought, but World War IV
will be fought with sticks and stones." - Albert Einstein