function read($socket)
{
if (is_string($str = @fread($socket, self::Packet)) && strlen($str) && strlen($str) < self::Packet) {
return $str;
}
if (isset($this->events['error']) && is_callable($func = $this->events['error'])) {
$func($this);
}
return FALSE;
}