예제 #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();
}
예제 #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();
}
예제 #3
0
파일: cancel.cpp 프로젝트: CharlesLiyh/cmpp
	void Cancel::serialize( StreamWriter& writer ) const {
		writer.write(&msgId, sizeof(msgId));
	}