public function receiveMessage(ProtoStream $stream, $messageCode)
    {
        $response = $this->connection->receive($stream);
        $class    = $this->classForCode($messageCode);
        $respCode = $response[0];
        $respBody = $response[1];

        if ($respCode != $messageCode) {
            throw $this->createResponseException($respCode, $respBody);
        }

        if ($class == null) {
            return;
        }

        return Protobuf::decode($class, (string) $respBody);
    }
public function receiveMessage(ProtoStream $stream, $messageCode)
    {
        $response = $this->connection->receive($stream);
        $class    = $this->classForCode($messageCode);
        $respCode = $response[0];
        $respBody = $response[1];

        if ($respCode != $messageCode) {
            throw $this->createResponseException($respCode, $respBody);
        }

        if ($class == null) {
            return;
        }

        return Protobuf::decode($class, (string) $respBody);
    }
public function receiveMessage ( ProtoStream $ stream , $ messageCode ) { $ response = $ this -> connection -> receive ( $ stream ) ; $ class = $ this -> classForCode ( $ messageCode ) ; $ respCode = $ response [ 0 ] ; $ respBody = $ response [ 1 ] ; if ( $ respCode != $ messageCode ) { throw $ this -> createResponseException ( $ respCode , $ respBody ) ; } if ( $ class == null ) { return ; } return Protobuf :: decode ( $ class , ( string ) $ respBody ) ; }
Receive a protobuf reponse message

@param \Riak\Client\Core\Transport\Proto\ProtoStream $stream
@param integer                                       $messageCode

@return \DrSlump\Protobuf\Message
Receive a protobuf reponse message