summaryrefslogtreecommitdiff
path: root/ext/sockets/tests/mcast_helpers.php.inc
blob: ad65a3f9d62b963365b4d9ed6c6750f6028ab5fc (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.");
	}
}