public function send(Message $message, $messageCode, $expectedResponseCode)
    {
        $payload  = $this->encodeMessage($message, $messageCode);
        $stream   = $this->connection->send($payload);

        return $this->receiveMessage($stream, $expectedResponseCode);
    }
public function send(Message $message, $messageCode, $expectedResponseCode)
    {
        $payload  = $this->encodeMessage($message, $messageCode);
        $stream   = $this->connection->send($payload);

        return $this->receiveMessage($stream, $expectedResponseCode);
    }
public function send ( Message $ message , $ messageCode , $ expectedResponseCode ) { $ payload = $ this -> encodeMessage ( $ message , $ messageCode ) ; $ stream = $ this -> connection -> send ( $ payload ) ; return $ this -> receiveMessage ( $ stream , $ expectedResponseCode ) ; }
Send a Protobuf message and receive the response

@param \DrSlump\Protobuf\Message $message
@param integer                   $messageCode
@param integer                   $expectedResponseCode

@return \DrSlump\Protobuf\Message
Send a Protobuf message and receive the response