ID:               47973
 User updated by:  nyim at 163 dot com
 Reported By:      nyim at 163 dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Streams related
 Operating System: suse10 linux 32 bit
 PHP Version:      5.2.9
 New Comment:

forgive me, the third parameter is microsecond, no millisecond


Previous Comments:
------------------------------------------------------------------------

[2009-04-15 16:11:51] nyim at 163 dot com

Description:
------------
stream_set_timeout($udp, 0,300); 
just like 
stream_set_timeout($udp, 0);
it ignore the third parameter
strace the process:
poll([{fd=3, events=POLLIN|POLLERR|POLLHUP, revents=POLLERR}], 1, 0) =
1

Reproduce code:
---------------
<?php
$udp = stream_socket_client("udp://127.0.0.1:3434");
fwrite($udp,'xx');
stream_set_timeout($udp, 0,300);
$time = microtime(true);
fread($udp,1500);
echo microtime(true) - $time;

Expected result:
----------------
0.30182409286499

Actual result:
--------------
3.3140182495117E-5


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=47973&edit=1

Reply via email to