mirror of
https://github.com/akuker/RASCSI.git
synced 2025-01-11 09:29:53 +00:00
Use protobuf::Messsge instead of protobuf::MessageLite
This commit is contained in:
parent
d6f7b491cf
commit
27136d7c20
@ -23,7 +23,7 @@ using namespace rascsi_interface;
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void SerializeMessage(int fd, const google::protobuf::MessageLite& message)
|
||||
void SerializeMessage(int fd, const google::protobuf::Message& message)
|
||||
{
|
||||
string data;
|
||||
message.SerializeToString(&data);
|
||||
@ -40,7 +40,7 @@ void SerializeMessage(int fd, const google::protobuf::MessageLite& message)
|
||||
}
|
||||
}
|
||||
|
||||
void DeserializeMessage(int fd, google::protobuf::MessageLite& message)
|
||||
void DeserializeMessage(int fd, google::protobuf::Message& message)
|
||||
{
|
||||
// Read the header with the size of the protobuf data
|
||||
uint8_t header_buf[4];
|
||||
|
@ -11,9 +11,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "google/protobuf/message_lite.h"
|
||||
#include "google/protobuf/message.h"
|
||||
#include "rascsi_interface.pb.h"
|
||||
|
||||
void SerializeMessage(int, const google::protobuf::MessageLite&);
|
||||
void DeserializeMessage(int, google::protobuf::MessageLite&);
|
||||
void SerializeMessage(int, const google::protobuf::Message&);
|
||||
void DeserializeMessage(int, google::protobuf::Message&);
|
||||
int ReadNBytes(int, uint8_t *, int);
|
||||
|
Loading…
x
Reference in New Issue
Block a user