mirror of
https://github.com/akuker/RASCSI.git
synced 2025-08-15 08:27:34 +00:00
Use protobuf::Messsge instead of protobuf::MessageLite
This commit is contained in:
@@ -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;
|
string data;
|
||||||
message.SerializeToString(&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
|
// Read the header with the size of the protobuf data
|
||||||
uint8_t header_buf[4];
|
uint8_t header_buf[4];
|
||||||
|
@@ -11,9 +11,9 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "google/protobuf/message_lite.h"
|
#include "google/protobuf/message.h"
|
||||||
#include "rascsi_interface.pb.h"
|
#include "rascsi_interface.pb.h"
|
||||||
|
|
||||||
void SerializeMessage(int, const google::protobuf::MessageLite&);
|
void SerializeMessage(int, const google::protobuf::Message&);
|
||||||
void DeserializeMessage(int, google::protobuf::MessageLite&);
|
void DeserializeMessage(int, google::protobuf::Message&);
|
||||||
int ReadNBytes(int, uint8_t *, int);
|
int ReadNBytes(int, uint8_t *, int);
|
||||||
|
Reference in New Issue
Block a user