function read($socket) {
		if (is_string($buf=@fread($socket,WS::Packet)) &&
			strlen($buf) &&
			strlen($buf)<WS::Packet)
			return $buf;
		if (isset($this->events['error']) &&
			is_callable($func=$this->events['error']))
			$func($this);
		$this->close($socket);
		return FALSE;
	}
function read($socket) {
		if (is_string($buf=@fread($socket,WS::Packet)) &&
			strlen($buf) &&
			strlen($buf)<WS::Packet)
			return $buf;
		if (isset($this->events['error']) &&
			is_callable($func=$this->events['error']))
			$func($this);
		$this->close($socket);
		return FALSE;
	}
function read ( $ socket ) { if ( is_string ( $ buf = @ fread ( $ socket , WS :: Packet ) ) && strlen ( $ buf ) && strlen ( $ buf ) < WS :: Packet ) return $ buf ; if ( isset ( $ this -> events [ 'error' ] ) && is_callable ( $ func = $ this -> events [ 'error' ] ) ) $ func ( $ this ) ; $ this -> close ( $ socket ) ; return FALSE ; }
Read from stream socket
@return string|FALSE
@param $socket resource
Read from stream socket