summaryrefslogtreecommitdiff
path: root/ext/sockets/tests/mcast_helpers.php.inc
blob: 7b73a9d77ab7a0b0b2d1e616662de14c8c3e3c5e (plain)
1
2
3
4
5
6
7
8
<?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.");
    }
}