public function serverRecvObject($recv)
    {
        $data = $this->serializer->unserialize($recv);

        if (count($data) != 4) {
            throw new ProtocolErrorException("Invalid message structure.");
        }

        $type = $data[0];
        $code = $data[1];
        $func = $data[2];
        $args = $data[3];

        if ($type != 0) {
            throw new ProtocolErrorException("Invalid message type for request: {$type}");
        }

        return array($code, $func, $args);
    }
public function serverRecvObject($recv)
    {
        $data = $this->serializer->unserialize($recv);

        if (count($data) != 4) {
            throw new ProtocolErrorException("Invalid message structure.");
        }

        $type = $data[0];
        $code = $data[1];
        $func = $data[2];
        $args = $data[3];

        if ($type != 0) {
            throw new ProtocolErrorException("Invalid message type for request: {$type}");
        }

        return array($code, $func, $args);
    }
@param  mixed $recv

@return array
@throws Exception\ProtocolErrorException