private function receive()
    {
        $timer = microtime(true);

        $str = fgets($this->socket);

        if ($str === false) {
            $this->close();
            throw new HSException('Cannot read from socket');
        }


        $this->logs[] = [
            'type' => 'receive',
            'time' => microtime(true) - $timer,
            'command' => $str
        ];

        return substr($str, 0, -1);
    }
private function receive()
    {
        $timer = microtime(true);

        $str = fgets($this->socket);

        if ($str === false) {
            $this->close();
            throw new HSException('Cannot read from socket');
        }


        $this->logs[] = [
            'type' => 'receive',
            'time' => microtime(true) - $timer,
            'command' => $str
        ];

        return substr($str, 0, -1);
    }
private function receive ( ) { $ timer = microtime ( true ) ; $ str = fgets ( $ this -> socket ) ; if ( $ str === false ) { $ this -> close ( ) ; throw new HSException ( 'Cannot read from socket' ) ; } $ this -> logs [ ] = [ 'type' => 'receive' , 'time' => microtime ( true ) - $ timer , 'command' => $ str ] ; return substr ( $ str , 0 , - 1 ) ; }
Receive one string from server.
String haven't trailing \n

@return string
@throws HSException
Receive one string from server . String haven t trailing \ n