protected function get_changed_sockets($bucket = self::DEFAULT_BUCKET, $timeout = 0)
	{
		$write_dummy = null;
		$exception_dummy = null;

		// grab all the children sockets
		$sockets = array();
		foreach ($this->forked_children as $pid => $child)
		{
			if ($child['bucket'] == $bucket)
			{
				$sockets[$pid] = $child['socket'];
			}
		}

		if (!empty($sockets))
		{
			// find changed sockets and return the array of them
			$result = @socket_select($sockets, $write_dummy, $exception_dummy, $timeout);
			if ($result !== false && $result > 0)
			{
				return $sockets;
			}
		}

		return null;
	}
protected function get_changed_sockets($bucket = self::DEFAULT_BUCKET, $timeout = 0)
	{
		$write_dummy = null;
		$exception_dummy = null;

		// grab all the children sockets
		$sockets = array();
		foreach ($this->forked_children as $pid => $child)
		{
			if ($child['bucket'] == $bucket)
			{
				$sockets[$pid] = $child['socket'];
			}
		}

		if (!empty($sockets))
		{
			// find changed sockets and return the array of them
			$result = @socket_select($sockets, $write_dummy, $exception_dummy, $timeout);
			if ($result !== false && $result > 0)
			{
				return $sockets;
			}
		}

		return null;
	}
protected function get_changed_sockets ( $ bucket = self :: DEFAULT_BUCKET , $ timeout = 0 ) { $ write_dummy = null ; $ exception_dummy = null ; // grab all the children sockets $ sockets = array ( ) ; foreach ( $ this -> forked_children as $ pid => $ child ) { if ( $ child [ 'bucket' ] == $ bucket ) { $ sockets [ $ pid ] = $ child [ 'socket' ] ; } } if ( ! empty ( $ sockets ) ) { // find changed sockets and return the array of them $ result = @ socket_select ( $ sockets , $ write_dummy , $ exception_dummy , $ timeout ) ; if ( $ result !== false && $ result > 0 ) { return $ sockets ; } } return null ; }
Checks if any changed child sockets are in the bucket.

@param int $bucket  The bucket to get results in.
@param int $timeout The timeout for changed socket checking (default 0).
@return int|void Returns the number of changed sockets for children workers in $bucket,
or empty array if none.
Checks if any changed child sockets are in the bucket .