本文整理汇总了C++中BitStream::Serialize方法的典型用法代码示例。如果您正苦于以下问题:C++ BitStream::Serialize方法的具体用法?C++ BitStream::Serialize怎么用?C++ BitStream::Serialize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BitStream
的用法示例。
在下文中一共展示了BitStream::Serialize方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Send
uint32_t FT_Node_Plugin::Send(FT_Session session,FT_DataBase* data, PacketPriority priority, PacketReliability reliability, char orderingChannel, const AddressOrGUID systemIdentifier){
RakNet::MessageID messageID = ID_SERVER_LOGIN;
RakNet::FT_MessageTypesNode nodeID = data->NodeType();
BitStream bsOut;
bsOut.Serialize(true, messageID);
bsOut.Serialize(true, nodeID);
session.Serialize(true, &bsOut);
data->Serialize(true, &bsOut);
if (_rakPeerInterface) {
return _rakPeerInterface->Send(&bsOut, priority, reliability, orderingChannel, systemIdentifier, false);
}
return 0;
}
示例2: OnSerialize
void NetChat::OnSerialize(const NetMessage& msg, BitStream& stream)
{
int testInt2 = testInt;
stream.Serialize(testInt2);
testInt = testInt2;
if (stream.isReading())
LSL_TRACE(lsl::StrFmt("NetChat.testInt=%d", testInt));
}