code: public function hasData($sec = 0, $usec = 0) {
  		$sec = (int)$sec;
  		$usec = (int)$usec;
  		if ($sec < 0) {
  			$sec = 0;
  		}
  		if ($usec < 0) {
  			$usec = 0;
  		}
  
  		$read = array($this->socket);
  		$write = array();
  		$except = array();
  		$sockets = socket_select($read, $write, $except, $sec, $usec);
  
  		if ($sockets === FALSE) {
  			return FALSE;
  		}
  		return $sockets > 0;
  	}
docs: Check if there is any data available
  @param int $sec seconds to wait until a timeout is reached
  @param int $usec microseconds to wait a timeout is reached
  @return bool true, in case there is data, that can be red