|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-10-06 04:04 UTC] trh at gmx dot li
socket's set to non-blocking, opened at port 9999 udp
$start=time();
while((time()-$start)<2)
{
$res=fread($fp2, 100);
echo "$res\n";
}
no answer from udp socket... a similar c program works
btw: in php4.0.7rc3 the problem isn't fixed
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 19:00:02 2025 UTC |
i used fsockopen("udp://$host", $port ....) socket_set_blocking($fp, FALSE)i tried now: $fp=fsockopen("udp://10.0.0.2", $mudport, $errno,$errstr); socket_set_timeout($fp, 3); if($fp) { echo "con: ok<br>"; fwrite($fp, "$query_string"); echo fread($fp, 100); fclose($fp); } result is, that php still does not receive an answer from the request (php4.0.7rc3 compiled as cgi for linux) tcpdump proves, that there was an answer: 15:22:30.654252 10.0.0.1.1062 > 10.0.0.2.4246: udp 39 15:22:30.661213 10.0.0.2.4246 > 10.0.0.1.4246: udp 126