private function read()
    {
        $s = null;

        for (; !feof($this->sock);) {
            if (($line = fgets($this->sock, 1e3)) == null) {
                continue;
            }

            $s = explode(' ', $line)[0];

            if (preg_match('#^[0-9]+$#', $s)) {
                break;
            }
        }

        return (int) $s;
    }
private function read()
    {
        $s = null;

        for (; !feof($this->sock);) {
            if (($line = fgets($this->sock, 1e3)) == null) {
                continue;
            }

            $s = explode(' ', $line)[0];

            if (preg_match('#^[0-9]+$#', $s)) {
                break;
            }
        }

        return (int) $s;
    }
private function read ( ) { $ s = null ; for ( ; ! feof ( $ this -> sock ) ; ) { if ( ( $ line = fgets ( $ this -> sock , 1e3 ) ) == null ) { continue ; } $ s = explode ( ' ' , $ line ) [ 0 ] ; if ( preg_match ( '#^[0-9]+$#' , $ s ) ) { break ; } } return ( int ) $ s ; }
Read the current connection stream.

@return string
Read the current connection stream .