diff options
Diffstat (limited to 'src/network/room_member.cpp')
| -rw-r--r-- | src/network/room_member.cpp | 490 |
1 files changed, 0 insertions, 490 deletions
diff --git a/src/network/room_member.cpp b/src/network/room_member.cpp deleted file mode 100644 index f229ec6fd..000000000 --- a/src/network/room_member.cpp +++ /dev/null | |||
| @@ -1,490 +0,0 @@ | |||
| 1 | // Copyright 2017 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include <atomic> | ||
| 6 | #include <list> | ||
| 7 | #include <mutex> | ||
| 8 | #include <set> | ||
| 9 | #include <thread> | ||
| 10 | #include "common/assert.h" | ||
| 11 | #include "enet/enet.h" | ||
| 12 | #include "network/packet.h" | ||
| 13 | #include "network/room_member.h" | ||
| 14 | |||
| 15 | namespace Network { | ||
| 16 | |||
| 17 | constexpr u32 ConnectionTimeoutMs = 5000; | ||
| 18 | |||
| 19 | class RoomMember::RoomMemberImpl { | ||
| 20 | public: | ||
| 21 | ENetHost* client = nullptr; ///< ENet network interface. | ||
| 22 | ENetPeer* server = nullptr; ///< The server peer the client is connected to | ||
| 23 | |||
| 24 | /// Information about the clients connected to the same room as us. | ||
| 25 | MemberList member_information; | ||
| 26 | /// Information about the room we're connected to. | ||
| 27 | RoomInformation room_information; | ||
| 28 | |||
| 29 | /// The current game name, id and version | ||
| 30 | GameInfo current_game_info; | ||
| 31 | |||
| 32 | std::atomic<State> state{State::Idle}; ///< Current state of the RoomMember. | ||
| 33 | void SetState(const State new_state); | ||
| 34 | bool IsConnected() const; | ||
| 35 | |||
| 36 | std::string nickname; ///< The nickname of this member. | ||
| 37 | MacAddress mac_address; ///< The mac_address of this member. | ||
| 38 | |||
| 39 | std::mutex network_mutex; ///< Mutex that controls access to the `client` variable. | ||
| 40 | /// Thread that receives and dispatches network packets | ||
| 41 | std::unique_ptr<std::thread> loop_thread; | ||
| 42 | std::mutex send_list_mutex; ///< Mutex that controls access to the `send_list` variable. | ||
| 43 | std::list<Packet> send_list; ///< A list that stores all packets to send the async | ||
| 44 | |||
| 45 | template <typename T> | ||
| 46 | using CallbackSet = std::set<CallbackHandle<T>>; | ||
| 47 | std::mutex callback_mutex; ///< The mutex used for handling callbacks | ||
| 48 | |||
| 49 | class Callbacks { | ||
| 50 | public: | ||
| 51 | template <typename T> | ||
| 52 | CallbackSet<T>& Get(); | ||
| 53 | |||
| 54 | private: | ||
| 55 | CallbackSet<WifiPacket> callback_set_wifi_packet; | ||
| 56 | CallbackSet<ChatEntry> callback_set_chat_messages; | ||
| 57 | CallbackSet<RoomInformation> callback_set_room_information; | ||
| 58 | CallbackSet<State> callback_set_state; | ||
| 59 | }; | ||
| 60 | Callbacks callbacks; ///< All CallbackSets to all events | ||
| 61 | |||
| 62 | void MemberLoop(); | ||
| 63 | |||
| 64 | void StartLoop(); | ||
| 65 | |||
| 66 | /** | ||
| 67 | * Sends data to the room. It will be send on channel 0 with flag RELIABLE | ||
| 68 | * @param packet The data to send | ||
| 69 | */ | ||
| 70 | void Send(Packet&& packet); | ||
| 71 | |||
| 72 | /** | ||
| 73 | * Sends a request to the server, asking for permission to join a room with the specified | ||
| 74 | * nickname and preferred mac. | ||
| 75 | * @params nickname The desired nickname. | ||
| 76 | * @params preferred_mac The preferred MAC address to use in the room, the NoPreferredMac tells | ||
| 77 | * the server to assign one for us. | ||
| 78 | */ | ||
| 79 | void SendJoinRequest(const std::string& nickname, | ||
| 80 | const MacAddress& preferred_mac = NoPreferredMac); | ||
| 81 | |||
| 82 | /** | ||
| 83 | * Extracts a MAC Address from a received ENet packet. | ||
| 84 | * @param event The ENet event that was received. | ||
| 85 | */ | ||
| 86 | void HandleJoinPacket(const ENetEvent* event); | ||
| 87 | /** | ||
| 88 | * Extracts RoomInformation and MemberInformation from a received RakNet packet. | ||
| 89 | * @param event The ENet event that was received. | ||
| 90 | */ | ||
| 91 | void HandleRoomInformationPacket(const ENetEvent* event); | ||
| 92 | |||
| 93 | /** | ||
| 94 | * Extracts a WifiPacket from a received ENet packet. | ||
| 95 | * @param event The ENet event that was received. | ||
| 96 | */ | ||
| 97 | void HandleWifiPackets(const ENetEvent* event); | ||
| 98 | |||
| 99 | /** | ||
| 100 | * Extracts a chat entry from a received ENet packet and adds it to the chat queue. | ||
| 101 | * @param event The ENet event that was received. | ||
| 102 | */ | ||
| 103 | void HandleChatPacket(const ENetEvent* event); | ||
| 104 | |||
| 105 | /** | ||
| 106 | * Disconnects the RoomMember from the Room | ||
| 107 | */ | ||
| 108 | void Disconnect(); | ||
| 109 | |||
| 110 | template <typename T> | ||
| 111 | void Invoke(const T& data); | ||
| 112 | |||
| 113 | template <typename T> | ||
| 114 | CallbackHandle<T> Bind(std::function<void(const T&)> callback); | ||
| 115 | }; | ||
| 116 | |||
| 117 | // RoomMemberImpl | ||
| 118 | void RoomMember::RoomMemberImpl::SetState(const State new_state) { | ||
| 119 | if (state != new_state) { | ||
| 120 | state = new_state; | ||
| 121 | Invoke<State>(state); | ||
| 122 | } | ||
| 123 | } | ||
| 124 | |||
| 125 | bool RoomMember::RoomMemberImpl::IsConnected() const { | ||
| 126 | return state == State::Joining || state == State::Joined; | ||
| 127 | } | ||
| 128 | |||
| 129 | void RoomMember::RoomMemberImpl::MemberLoop() { | ||
| 130 | // Receive packets while the connection is open | ||
| 131 | while (IsConnected()) { | ||
| 132 | std::lock_guard<std::mutex> lock(network_mutex); | ||
| 133 | ENetEvent event; | ||
| 134 | if (enet_host_service(client, &event, 100) > 0) { | ||
| 135 | switch (event.type) { | ||
| 136 | case ENET_EVENT_TYPE_RECEIVE: | ||
| 137 | switch (event.packet->data[0]) { | ||
| 138 | case IdWifiPacket: | ||
| 139 | HandleWifiPackets(&event); | ||
| 140 | break; | ||
| 141 | case IdChatMessage: | ||
| 142 | HandleChatPacket(&event); | ||
| 143 | break; | ||
| 144 | case IdRoomInformation: | ||
| 145 | HandleRoomInformationPacket(&event); | ||
| 146 | break; | ||
| 147 | case IdJoinSuccess: | ||
| 148 | // The join request was successful, we are now in the room. | ||
| 149 | // If we joined successfully, there must be at least one client in the room: us. | ||
| 150 | ASSERT_MSG(member_information.size() > 0, | ||
| 151 | "We have not yet received member information."); | ||
| 152 | HandleJoinPacket(&event); // Get the MAC Address for the client | ||
| 153 | SetState(State::Joined); | ||
| 154 | break; | ||
| 155 | case IdNameCollision: | ||
| 156 | SetState(State::NameCollision); | ||
| 157 | break; | ||
| 158 | case IdMacCollision: | ||
| 159 | SetState(State::MacCollision); | ||
| 160 | break; | ||
| 161 | case IdVersionMismatch: | ||
| 162 | SetState(State::WrongVersion); | ||
| 163 | break; | ||
| 164 | case IdCloseRoom: | ||
| 165 | SetState(State::LostConnection); | ||
| 166 | break; | ||
| 167 | } | ||
| 168 | enet_packet_destroy(event.packet); | ||
| 169 | break; | ||
| 170 | case ENET_EVENT_TYPE_DISCONNECT: | ||
| 171 | SetState(State::LostConnection); | ||
| 172 | break; | ||
| 173 | } | ||
| 174 | } | ||
| 175 | { | ||
| 176 | std::lock_guard<std::mutex> lock(send_list_mutex); | ||
| 177 | for (const auto& packet : send_list) { | ||
| 178 | ENetPacket* enetPacket = enet_packet_create(packet.GetData(), packet.GetDataSize(), | ||
| 179 | ENET_PACKET_FLAG_RELIABLE); | ||
| 180 | enet_peer_send(server, 0, enetPacket); | ||
| 181 | } | ||
| 182 | enet_host_flush(client); | ||
| 183 | send_list.clear(); | ||
| 184 | } | ||
| 185 | } | ||
| 186 | Disconnect(); | ||
| 187 | }; | ||
| 188 | |||
| 189 | void RoomMember::RoomMemberImpl::StartLoop() { | ||
| 190 | loop_thread = std::make_unique<std::thread>(&RoomMember::RoomMemberImpl::MemberLoop, this); | ||
| 191 | } | ||
| 192 | |||
| 193 | void RoomMember::RoomMemberImpl::Send(Packet&& packet) { | ||
| 194 | std::lock_guard<std::mutex> lock(send_list_mutex); | ||
| 195 | send_list.push_back(std::move(packet)); | ||
| 196 | } | ||
| 197 | |||
| 198 | void RoomMember::RoomMemberImpl::SendJoinRequest(const std::string& nickname, | ||
| 199 | const MacAddress& preferred_mac) { | ||
| 200 | Packet packet; | ||
| 201 | packet << static_cast<u8>(IdJoinRequest); | ||
| 202 | packet << nickname; | ||
| 203 | packet << preferred_mac; | ||
| 204 | packet << network_version; | ||
| 205 | Send(std::move(packet)); | ||
| 206 | } | ||
| 207 | |||
| 208 | void RoomMember::RoomMemberImpl::HandleRoomInformationPacket(const ENetEvent* event) { | ||
| 209 | Packet packet; | ||
| 210 | packet.Append(event->packet->data, event->packet->dataLength); | ||
| 211 | |||
| 212 | // Ignore the first byte, which is the message id. | ||
| 213 | packet.IgnoreBytes(sizeof(u8)); // Igonore the message type | ||
| 214 | |||
| 215 | RoomInformation info{}; | ||
| 216 | packet >> info.name; | ||
| 217 | packet >> info.member_slots; | ||
| 218 | room_information.name = info.name; | ||
| 219 | room_information.member_slots = info.member_slots; | ||
| 220 | |||
| 221 | u32 num_members; | ||
| 222 | packet >> num_members; | ||
| 223 | member_information.resize(num_members); | ||
| 224 | |||
| 225 | for (auto& member : member_information) { | ||
| 226 | packet >> member.nickname; | ||
| 227 | packet >> member.mac_address; | ||
| 228 | packet >> member.game_info.name; | ||
| 229 | packet >> member.game_info.id; | ||
| 230 | } | ||
| 231 | Invoke(room_information); | ||
| 232 | } | ||
| 233 | |||
| 234 | void RoomMember::RoomMemberImpl::HandleJoinPacket(const ENetEvent* event) { | ||
| 235 | Packet packet; | ||
| 236 | packet.Append(event->packet->data, event->packet->dataLength); | ||
| 237 | |||
| 238 | // Ignore the first byte, which is the message id. | ||
| 239 | packet.IgnoreBytes(sizeof(u8)); // Igonore the message type | ||
| 240 | |||
| 241 | // Parse the MAC Address from the packet | ||
| 242 | packet >> mac_address; | ||
| 243 | SetState(State::Joined); | ||
| 244 | } | ||
| 245 | |||
| 246 | void RoomMember::RoomMemberImpl::HandleWifiPackets(const ENetEvent* event) { | ||
| 247 | WifiPacket wifi_packet{}; | ||
| 248 | Packet packet; | ||
| 249 | packet.Append(event->packet->data, event->packet->dataLength); | ||
| 250 | |||
| 251 | // Ignore the first byte, which is the message id. | ||
| 252 | packet.IgnoreBytes(sizeof(u8)); // Igonore the message type | ||
| 253 | |||
| 254 | // Parse the WifiPacket from the packet | ||
| 255 | u8 frame_type; | ||
| 256 | packet >> frame_type; | ||
| 257 | WifiPacket::PacketType type = static_cast<WifiPacket::PacketType>(frame_type); | ||
| 258 | |||
| 259 | wifi_packet.type = type; | ||
| 260 | packet >> wifi_packet.channel; | ||
| 261 | packet >> wifi_packet.transmitter_address; | ||
| 262 | packet >> wifi_packet.destination_address; | ||
| 263 | |||
| 264 | u32 data_length; | ||
| 265 | packet >> data_length; | ||
| 266 | |||
| 267 | packet >> wifi_packet.data; | ||
| 268 | |||
| 269 | Invoke<WifiPacket>(wifi_packet); | ||
| 270 | } | ||
| 271 | |||
| 272 | void RoomMember::RoomMemberImpl::HandleChatPacket(const ENetEvent* event) { | ||
| 273 | Packet packet; | ||
| 274 | packet.Append(event->packet->data, event->packet->dataLength); | ||
| 275 | |||
| 276 | // Ignore the first byte, which is the message id. | ||
| 277 | packet.IgnoreBytes(sizeof(u8)); | ||
| 278 | |||
| 279 | ChatEntry chat_entry{}; | ||
| 280 | packet >> chat_entry.nickname; | ||
| 281 | packet >> chat_entry.message; | ||
| 282 | Invoke<ChatEntry>(chat_entry); | ||
| 283 | } | ||
| 284 | |||
| 285 | void RoomMember::RoomMemberImpl::Disconnect() { | ||
| 286 | member_information.clear(); | ||
| 287 | room_information.member_slots = 0; | ||
| 288 | room_information.name.clear(); | ||
| 289 | |||
| 290 | if (!server) | ||
| 291 | return; | ||
| 292 | enet_peer_disconnect(server, 0); | ||
| 293 | |||
| 294 | ENetEvent event; | ||
| 295 | while (enet_host_service(client, &event, ConnectionTimeoutMs) > 0) { | ||
| 296 | switch (event.type) { | ||
| 297 | case ENET_EVENT_TYPE_RECEIVE: | ||
| 298 | enet_packet_destroy(event.packet); // Ignore all incoming data | ||
| 299 | break; | ||
| 300 | case ENET_EVENT_TYPE_DISCONNECT: | ||
| 301 | server = nullptr; | ||
| 302 | return; | ||
| 303 | } | ||
| 304 | } | ||
| 305 | // didn't disconnect gracefully force disconnect | ||
| 306 | enet_peer_reset(server); | ||
| 307 | server = nullptr; | ||
| 308 | } | ||
| 309 | |||
| 310 | template <> | ||
| 311 | RoomMember::RoomMemberImpl::CallbackSet<WifiPacket>& RoomMember::RoomMemberImpl::Callbacks::Get() { | ||
| 312 | return callback_set_wifi_packet; | ||
| 313 | } | ||
| 314 | |||
| 315 | template <> | ||
| 316 | RoomMember::RoomMemberImpl::CallbackSet<RoomMember::State>& | ||
| 317 | RoomMember::RoomMemberImpl::Callbacks::Get() { | ||
| 318 | return callback_set_state; | ||
| 319 | } | ||
| 320 | |||
| 321 | template <> | ||
| 322 | RoomMember::RoomMemberImpl::CallbackSet<RoomInformation>& | ||
| 323 | RoomMember::RoomMemberImpl::Callbacks::Get() { | ||
| 324 | return callback_set_room_information; | ||
| 325 | } | ||
| 326 | |||
| 327 | template <> | ||
| 328 | RoomMember::RoomMemberImpl::CallbackSet<ChatEntry>& RoomMember::RoomMemberImpl::Callbacks::Get() { | ||
| 329 | return callback_set_chat_messages; | ||
| 330 | } | ||
| 331 | |||
| 332 | template <typename T> | ||
| 333 | void RoomMember::RoomMemberImpl::Invoke(const T& data) { | ||
| 334 | std::lock_guard<std::mutex> lock(callback_mutex); | ||
| 335 | CallbackSet<T> callback_set = callbacks.Get<T>(); | ||
| 336 | for (auto const& callback : callback_set) | ||
| 337 | (*callback)(data); | ||
| 338 | } | ||
| 339 | |||
| 340 | template <typename T> | ||
| 341 | RoomMember::CallbackHandle<T> RoomMember::RoomMemberImpl::Bind( | ||
| 342 | std::function<void(const T&)> callback) { | ||
| 343 | std::lock_guard<std::mutex> lock(callback_mutex); | ||
| 344 | CallbackHandle<T> handle; | ||
| 345 | handle = std::make_shared<std::function<void(const T&)>>(callback); | ||
| 346 | callbacks.Get<T>().insert(handle); | ||
| 347 | return handle; | ||
| 348 | } | ||
| 349 | |||
| 350 | // RoomMember | ||
| 351 | RoomMember::RoomMember() : room_member_impl{std::make_unique<RoomMemberImpl>()} { | ||
| 352 | room_member_impl->client = enet_host_create(nullptr, 1, NumChannels, 0, 0); | ||
| 353 | ASSERT_MSG(room_member_impl->client != nullptr, "Could not create client"); | ||
| 354 | } | ||
| 355 | |||
| 356 | RoomMember::~RoomMember() { | ||
| 357 | ASSERT_MSG(!IsConnected(), "RoomMember is being destroyed while connected"); | ||
| 358 | enet_host_destroy(room_member_impl->client); | ||
| 359 | } | ||
| 360 | |||
| 361 | RoomMember::State RoomMember::GetState() const { | ||
| 362 | return room_member_impl->state; | ||
| 363 | } | ||
| 364 | |||
| 365 | const RoomMember::MemberList& RoomMember::GetMemberInformation() const { | ||
| 366 | return room_member_impl->member_information; | ||
| 367 | } | ||
| 368 | |||
| 369 | const std::string& RoomMember::GetNickname() const { | ||
| 370 | return room_member_impl->nickname; | ||
| 371 | } | ||
| 372 | |||
| 373 | const MacAddress& RoomMember::GetMacAddress() const { | ||
| 374 | ASSERT_MSG(IsConnected(), "Tried to get MAC address while not connected"); | ||
| 375 | return room_member_impl->mac_address; | ||
| 376 | } | ||
| 377 | |||
| 378 | RoomInformation RoomMember::GetRoomInformation() const { | ||
| 379 | return room_member_impl->room_information; | ||
| 380 | } | ||
| 381 | |||
| 382 | void RoomMember::Join(const std::string& nick, const char* server_addr, u16 server_port, | ||
| 383 | u16 client_port, const MacAddress& preferred_mac) { | ||
| 384 | // If the member is connected, kill the connection first | ||
| 385 | if (room_member_impl->loop_thread && room_member_impl->loop_thread->joinable()) { | ||
| 386 | room_member_impl->SetState(State::Error); | ||
| 387 | room_member_impl->loop_thread->join(); | ||
| 388 | room_member_impl->loop_thread.reset(); | ||
| 389 | } | ||
| 390 | // If the thread isn't running but the ptr still exists, reset it | ||
| 391 | else if (room_member_impl->loop_thread) { | ||
| 392 | room_member_impl->loop_thread.reset(); | ||
| 393 | } | ||
| 394 | |||
| 395 | ENetAddress address{}; | ||
| 396 | enet_address_set_host(&address, server_addr); | ||
| 397 | address.port = server_port; | ||
| 398 | room_member_impl->server = | ||
| 399 | enet_host_connect(room_member_impl->client, &address, NumChannels, 0); | ||
| 400 | |||
| 401 | if (!room_member_impl->server) { | ||
| 402 | room_member_impl->SetState(State::Error); | ||
| 403 | return; | ||
| 404 | } | ||
| 405 | |||
| 406 | ENetEvent event{}; | ||
| 407 | int net = enet_host_service(room_member_impl->client, &event, ConnectionTimeoutMs); | ||
| 408 | if (net > 0 && event.type == ENET_EVENT_TYPE_CONNECT) { | ||
| 409 | room_member_impl->nickname = nick; | ||
| 410 | room_member_impl->SetState(State::Joining); | ||
| 411 | room_member_impl->StartLoop(); | ||
| 412 | room_member_impl->SendJoinRequest(nick, preferred_mac); | ||
| 413 | SendGameInfo(room_member_impl->current_game_info); | ||
| 414 | } else { | ||
| 415 | room_member_impl->SetState(State::CouldNotConnect); | ||
| 416 | } | ||
| 417 | } | ||
| 418 | |||
| 419 | bool RoomMember::IsConnected() const { | ||
| 420 | return room_member_impl->IsConnected(); | ||
| 421 | } | ||
| 422 | |||
| 423 | void RoomMember::SendWifiPacket(const WifiPacket& wifi_packet) { | ||
| 424 | Packet packet; | ||
| 425 | packet << static_cast<u8>(IdWifiPacket); | ||
| 426 | packet << static_cast<u8>(wifi_packet.type); | ||
| 427 | packet << wifi_packet.channel; | ||
| 428 | packet << wifi_packet.transmitter_address; | ||
| 429 | packet << wifi_packet.destination_address; | ||
| 430 | packet << wifi_packet.data; | ||
| 431 | room_member_impl->Send(std::move(packet)); | ||
| 432 | } | ||
| 433 | |||
| 434 | void RoomMember::SendChatMessage(const std::string& message) { | ||
| 435 | Packet packet; | ||
| 436 | packet << static_cast<u8>(IdChatMessage); | ||
| 437 | packet << message; | ||
| 438 | room_member_impl->Send(std::move(packet)); | ||
| 439 | } | ||
| 440 | |||
| 441 | void RoomMember::SendGameInfo(const GameInfo& game_info) { | ||
| 442 | room_member_impl->current_game_info = game_info; | ||
| 443 | if (!IsConnected()) | ||
| 444 | return; | ||
| 445 | |||
| 446 | Packet packet; | ||
| 447 | packet << static_cast<u8>(IdSetGameInfo); | ||
| 448 | packet << game_info.name; | ||
| 449 | packet << game_info.id; | ||
| 450 | room_member_impl->Send(std::move(packet)); | ||
| 451 | } | ||
| 452 | |||
| 453 | RoomMember::CallbackHandle<RoomMember::State> RoomMember::BindOnStateChanged( | ||
| 454 | std::function<void(const RoomMember::State&)> callback) { | ||
| 455 | return room_member_impl->Bind(callback); | ||
| 456 | } | ||
| 457 | |||
| 458 | RoomMember::CallbackHandle<WifiPacket> RoomMember::BindOnWifiPacketReceived( | ||
| 459 | std::function<void(const WifiPacket&)> callback) { | ||
| 460 | return room_member_impl->Bind(callback); | ||
| 461 | } | ||
| 462 | |||
| 463 | RoomMember::CallbackHandle<RoomInformation> RoomMember::BindOnRoomInformationChanged( | ||
| 464 | std::function<void(const RoomInformation&)> callback) { | ||
| 465 | return room_member_impl->Bind(callback); | ||
| 466 | } | ||
| 467 | |||
| 468 | RoomMember::CallbackHandle<ChatEntry> RoomMember::BindOnChatMessageRecieved( | ||
| 469 | std::function<void(const ChatEntry&)> callback) { | ||
| 470 | return room_member_impl->Bind(callback); | ||
| 471 | } | ||
| 472 | |||
| 473 | template <typename T> | ||
| 474 | void RoomMember::Unbind(CallbackHandle<T> handle) { | ||
| 475 | std::lock_guard<std::mutex> lock(room_member_impl->callback_mutex); | ||
| 476 | room_member_impl->callbacks.Get<T>().erase(handle); | ||
| 477 | } | ||
| 478 | |||
| 479 | void RoomMember::Leave() { | ||
| 480 | room_member_impl->SetState(State::Idle); | ||
| 481 | room_member_impl->loop_thread->join(); | ||
| 482 | room_member_impl->loop_thread.reset(); | ||
| 483 | } | ||
| 484 | |||
| 485 | template void RoomMember::Unbind(CallbackHandle<WifiPacket>); | ||
| 486 | template void RoomMember::Unbind(CallbackHandle<RoomMember::State>); | ||
| 487 | template void RoomMember::Unbind(CallbackHandle<RoomInformation>); | ||
| 488 | template void RoomMember::Unbind(CallbackHandle<ChatEntry>); | ||
| 489 | |||
| 490 | } // namespace Network | ||