本文整理汇总了C++中Serialiser::SerialiseBuffer方法的典型用法代码示例。如果您正苦于以下问题:C++ Serialiser::SerialiseBuffer方法的具体用法?C++ Serialiser::SerialiseBuffer怎么用?C++ Serialiser::SerialiseBuffer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Serialiser
的用法示例。
在下文中一共展示了Serialiser::SerialiseBuffer方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ReceiveMessage
//.........这里部分代码省略.........
{
string existingClient;
ser->Serialise("", existingClient);
SAFE_DELETE(ser);
SAFE_DELETE(m_Socket);
RDCLOG("Got busy signal: '%s", existingClient.c_str());
msg->Type = eRemoteMsg_Busy;
msg->Busy.ClientName = existingClient;
return;
}
else if(type == ePacket_CopyCapture)
{
msg->Type = eRemoteMsg_CaptureCopied;
ser->Serialise("", msg->NewCapture.ID);
SAFE_DELETE(ser);
msg->NewCapture.localpath = m_CaptureCopies[msg->NewCapture.ID];
if(!RecvChunkedFile(m_Socket, ePacket_CopyCapture, msg->NewCapture.localpath.elems, ser, NULL))
{
SAFE_DELETE(ser);
SAFE_DELETE(m_Socket);
msg->Type = eRemoteMsg_Disconnected;
return;
}
m_CaptureCopies.erase(msg->NewCapture.ID);
SAFE_DELETE(ser);
return;
}
else if(type == ePacket_NewChild)
{
msg->Type = eRemoteMsg_NewChild;
ser->Serialise("", msg->NewChild.PID);
ser->Serialise("", msg->NewChild.ident);
RDCLOG("Got a new child process: %u %u", msg->NewChild.PID, msg->NewChild.ident);
SAFE_DELETE(ser);
return;
}
else if(type == ePacket_NewCapture)
{
msg->Type = eRemoteMsg_NewCapture;
ser->Serialise("", msg->NewCapture.ID);
ser->Serialise("", msg->NewCapture.timestamp);
string path;
ser->Serialise("", path);
msg->NewCapture.localpath = path;
if(!m_Local)
msg->NewCapture.localpath = "";
uint32_t thumblen = 0;
ser->Serialise("", thumblen);
create_array_uninit(msg->NewCapture.thumbnail, thumblen);
size_t l = 0;
byte *buf = &msg->NewCapture.thumbnail[0];
ser->SerialiseBuffer("", buf, l);
RDCLOG("Got a new capture: %d (time %llu) %d byte thumbnail", msg->NewCapture.ID,
msg->NewCapture.timestamp, thumblen);
SAFE_DELETE(ser);
return;
}
else if(type == ePacket_RegisterAPI)
{
msg->Type = eRemoteMsg_RegisterAPI;
ser->Serialise("", m_API);
msg->RegisterAPI.APIName = m_API;
RDCLOG("Used API: %s", m_API.c_str());
SAFE_DELETE(ser);
return;
}
}
SAFE_DELETE(ser);
msg->Type = eRemoteMsg_Noop;
}