Browse Source

php - socket fix not yet in git

master
kanoi 10 years ago
parent
commit
a7813011e4
  1. 6
      pool/socket.php

6
pool/socket.php

@ -14,9 +14,9 @@ function socktmo($socket, $factor)
$usetmo = $tmo * $factor; $usetmo = $tmo * $factor;
$sec = floor($usetmo); $sec = floor($usetmo);
$usec = floor(($usetmo - $sec) * 1000000); $usec = floor(($usetmo - $sec) * 1000000);
$tmoval = array('sec' => $sec, 'usec' => $use); $tmoval = array('sec' => $sec, 'usec' => $usec);
socket_set_option($socket, SOL_SOCKET, SO_SNDTIMEO, $tmo); socket_set_option($socket, SOL_SOCKET, SO_SNDTIMEO, $tmoval);
socket_set_option($socket, SOL_SOCKET, SO_RCVTIMEO, $tmo); socket_set_option($socket, SOL_SOCKET, SO_RCVTIMEO, $tmoval);
} }
# #
# Note that $port in AF_UNIX should be the socket filename # Note that $port in AF_UNIX should be the socket filename

Loading…
Cancel
Save