PhpOrient\Protocols\Binary\Operations\Connect::_read PHP Method

_read() protected method

Read the response from the socket.
protected _read ( ) : integer
return integer The session id.
    protected function _read()
    {
        $_sessionId = $this->_readInt();
        $this->_transport->setSessionId($_sessionId);
        if ($this->_transport->getProtocolVersion() > 26) {
            $token = $this->_readString();
            # token
            if (empty($token)) {
                $this->_transport->setRequestToken(false);
            }
            $this->_transport->setToken($token);
        }
        $this->_transport->connected = true;
        return $_sessionId;
    }