void MMsgRoutingCreateGroup::Unpack(void) { WTRACE("MMsgRoutingCreateGroup::Unpack"); RoutingServerMessage::Unpack(); if (GetServiceType() != WONMsg::MiniRoutingServer || GetMessageType() != WONMsg::RoutingCreateGroup) { WDBG_AH("MMsgRoutingCreateGroup::Unpack Not a RoutingCreateGroup message!"); throw WONMsg::BadMsgException(*this, __LINE__, __FILE__, "Not a RoutingCreateGroup message."); } WDBG_LL("MMsgRoutingCreateGroup::Unpack Reading message data"); // read in group name ReadGroupName(mGroupName); // read in flags unsigned char aFlags = ReadByte(); mIsPublic = ((aFlags & 0x01) != 0); mAnnounceGroupChanges = ((aFlags & 0x02) != 0); // read in client count unsigned short aNumClients = ReadShort(); // read in client list mClientList.clear(); for (int iClient = 0; iClient < aNumClients; iClient++) mClientList.push_back(ReadClientId()); }
void RoutingServerClientIdFlagMessage::Unpack(void) { WTRACE("RoutingServerClientIdFlagMessage::Unpack"); RoutingServerFlagMessage::Unpack(); WDBG_LL("RoutingServerClientIdFlagMessage::Unpack Reading message data"); mClientId = ReadClientId(); }
void MMsgRoutingRemoveSuccessor::Unpack(void) { WTRACE("MMsgRoutingRemoveSuccessor::Unpack"); RoutingServerMessage::Unpack(); if (GetServiceType() != WONMsg::MiniRoutingServer || GetMessageType() != WONMsg::RoutingRemoveSuccessor) { WDBG_AH("MMsgRoutingRemoveSuccessor::Unpack Not a RoutingRemoveSuccessor message!"); throw WONMsg::BadMsgException(*this, __LINE__, __FILE__, "Not a RoutingRemoveSuccessor message."); } WDBG_LL("MMsgRoutingRemoveSuccessor::Unpack Reading message data"); mClientId = ReadClientId(); }
void RoutingServerGenericFlagMessage::Unpack(void) { WTRACE("RoutingServerGenericFlagMessage::Unpack"); RoutingServerFlagMessage::Unpack(); WDBG_LL("RoutingServerGenericFlagMessage::Unpack Reading message data"); mContentType = (ContentType)ReadByte(); switch (mContentType) { case CONTENTTYPE_CLIENTID: mClientId = ReadClientId(); break; case CONTENTTYPE_CLIENTNAME: ReadClientName(mClientName); break; case CONTENTTYPE_WONUSERID: mWONUserId = ReadLong(); break; default: mContentType = CONTENTTYPE_UNKNOWN; break; } }
void MMsgRoutingPeerData::Unpack(void) { WTRACE("MMsgRoutingPeerData::Unpack"); RoutingServerMessage::Unpack(); if (GetServiceType() != WONMsg::MiniRoutingServer || GetMessageType() != WONMsg::RoutingPeerData) { WDBG_AH("MMsgRoutingPeerData::Unpack Not a RoutingPeerData message!"); throw WONMsg::BadMsgException(*this, __LINE__, __FILE__, "Not a RoutingPeerData message."); } WDBG_LL("MMsgRoutingPeerData::Unpack Reading message data"); // read in the client id mClientId = ReadClientId(); // read in the data (the whole message minus the header and client id field) mData.assign(reinterpret_cast<const unsigned char*>(ReadBytes(BytesLeftToRead())), BytesLeftToRead()); }
void MMsgRoutingRemoveFromGroup::Unpack(void) { WTRACE("MMsgRoutingRemoveFromGroup::Unpack"); RoutingServerMessage::Unpack(); if (GetServiceType() != WONMsg::MiniRoutingServer || GetMessageType() != WONMsg::RoutingRemoveFromGroup) { WDBG_AH("MMsgRoutingRemoveFromGroup::Unpack Not a RoutingRemoveFromGroup message!"); throw WONMsg::BadMsgException(*this, __LINE__, __FILE__, "Not a RoutingRemoveFromGroup message."); } WDBG_LL("MMsgRoutingRemoveFromGroup::Unpack Reading message data"); // read in group id mGroupId = ReadGroupId(); // read in client id mClientId = ReadClientId(); }
void MMsgRoutingClientChange::SimpleUnpack(void) { mClientId = ReadClientId(); mReason = ReadByte(); }