Bug #10320 Updated: Read fails with non_blocking socket.
| From: | sniper@php.net | Date: | Tue, 12 Jun 2001 05:12:56 +0000 |
| Subject: | Bug #10320 Updated: Read fails with non_blocking socket. | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-57217@lists.php.net to get a copy of this message | ||
ID: 10320
Updated by: sniper
Reported By: cyberlotnet@hotmail.com
Old-Status: Open
Status: Closed
Bug Type: Sockets related
Operating system:
PHP Version: 4.0.4pl1
Assigned To:
Comments:
Please update to PHP 4.0.5 at least. Or if that does not
work either, try the PHP 4.0.6RC3 from:
http://www.php.net/~andi/php-4.0.6RC3.tar.gz
And if you still have problems, please include a short
but complete example script into this report which
can be used to reproduce this.
--Jani
Previous Comments:
---------------------------------------------------------------------------
[2001-04-13 14:49:08] cyberlotnet@hotmail.com
This is a small part of my script.. EVERYTHING works except
for the read.. and that works soon as I take out the
non_blocking, however my script doesnt work properly then so
thats not a valid solution..
The writeout is just a write that allows me to specifiy a
single connection or in this case "all" which sends to all..
That works.. but the read.. never returns anything, its like
its not buffering input and holding it in the socket till I
can read it.
function newlogins() {
global $connectbuff, $sock, $buffcount, $logonmess;
if (($connectbuff[$buffcount] = accept_connect($sock)) >
-1) {
writeout ($connectbuff[$buffcount], $logonmess);
$send = "You are the " . $buffcount . " player to
log onn";
writeout ($connectbuff[$buffcount], $send);
$send = "Enter a username : ";
writeout ($connectbuff[$buffcount], $send);
$buffcount++;
}
read($connectbuff[0],$buff,4096);
writeout($connectbuff,$buff,"all");
}
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10320&edit=2