php-src/ext/sockets/tests/mcast_helpers.php.inc
2020-02-03 22:52:20 +01:00

8 lines
281 B
PHP

<?php
function checktimeout($sock, $limit) {
$readfs = array($sock);
$writefs = $exceptfs = array();
if (socket_select($readfs, $writefs, $exceptfs, 0, $limit*1000) != 1) {
die("Socket read timeout hit. Can be a bug, a test bug, or a firewall issue.");
}
}