Ejemplo n.º 1
0
ACE_Message_Block* UdpCmdSyncId::serialize( ACE_UINT32 seqId,ACE_UINT32 chId,PeerID peerId )
{
	UdpCmdBase::serialize(seqId,chId,peerId);
	StreamWriter wr;
	wr.write((char*)&cmd_hdr_,SIZE_OF_CMD_HEADER);

	return wr.get_message_block();
}
Ejemplo n.º 2
0
ACE_Message_Block* CmdJoin::serialize(ACE_UINT32 seqId,ACE_UINT32 chId,PeerID peerId)
{
	CmdBase::serialize(seqId,chId,peerId);

	StreamWriter wr;
	wr.write((char*)&cmd_hdr_,SIZE_OF_CMD_HEADER);

	wr.write_uint16(tcp_port_);
	wr.write_uint16(udp_port_);
	wr.write_uint16(version_);

	//加入本机的IP地址列表.what's this mean?

	return wr.get_message_block();
}
Ejemplo n.º 3
0
	void Cancel::serialize( StreamWriter& writer ) const {
		writer.write(&msgId, sizeof(msgId));
	}