|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-12-10 07:40 UTC] tit dot petric at telemach dot net
$r = array($network->_connection);
if (socket_select($r,$w=NULL,$e=NULL,0)===false) {
echo "socket_select failed: reason: " . socket_strerror(socket_last_error()) . "\n";
} else {
... code...
}
somehow neither part of the if/else case gets executed for me, socket_select just seems to "hang".. the $network->_connection is valid (no errors in connecting) and non blocking (no errors here either)..
the code used to work fine for quite some time, also on 4.2.3 now i don't have a clue what goes wrong -> if i send data trough the socket i actually get it on the other side (the application here would be an irc bot, so i see him join the network and then timeout since it hangs on socket_select)
the code for it is on www.sf.net/projects/phpinfobot/ in the cvs, if somebody wants to test it, the important files should be
/infobot.php
/include/system/network.php
/include/system/irc.php
the rest is pretty much non important
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 05:00:01 2025 UTC |
on windows i get the "same" result with 4.3rc2, just that it hangs on socket_read() not on socket_select PHP Warning: socket_read() unable to read from socket [10035]: A non-blocking s ocket operation could not be completed immediately. in D:\respawn\phpinfobot\infobot_win.php on line 28 then it crashes and i get that microsoft "report crash" thingie.. the code related to this: if (!socket_set_nonblock($this->_connection)) { report->info("couldnt set nonblocking mode.\n\n"); } (this info line above ofcourse doesnt get printed) as for the debian, i'm not really that much into compiling & everything, and im definetly not fond of it on a "production" server..