public function recvLine($delimiter = "\n") {
        $str = '';
        while (!$this->stream_eof()) {
            $char = $this->recvChr();
            $str .= $char;
            if ($char === false) { return $str; }
            if (strpos($str, $delimiter) !== false) { return $str; }
        }
        return $str;
    }