protected static function read($bare = false) 
    {
        $delim = $bare ? "\n" : "\x04";
       
        for($buffer = '';($char = fgetc(self::$socket)) != $delim;$buffer .= $char);
       
        return trim($buffer);
    }