SEGS  0.4.2
Super Entity Game Server
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ServerListResponse.h
Go to the documentation of this file.
1 /*
2  * SEGS - Super Entity Game Server
3  * http://www.segs.io/
4  * Copyright (c) 2006 - 2018 SEGS Team (see Authors.txt)
5  * This software is licensed! (See License.txt for details)
6  */
7 
8 #pragma once
10 #include <deque>
11 
13 {
14  uint8_t id;
15  uint32_t addr; // result of calling get_ip_address() on ACE_Inet_ADDR
16  uint16_t port;
17  uint16_t current_players;
18  uint16_t max_players;
19  uint8_t online;
20 };
21 
23 {
24  std::deque<GameServerInfo> m_serv_list;
25  uint8_t m_preferred_server_idx;
26 public:
28  {}
29  void set_server_list(const std::deque<GameServerInfo> &srv) {m_serv_list=srv;}
30  void serializeto(GrowingBuffer &buf) const;
31  void serializefrom(GrowingBuffer &buf);
32 };
uint8_t id
Definition: ServerListResponse.h:14
uint16_t current_players
Definition: ServerListResponse.h:17
void serializeto(GrowingBuffer &buf) const
Definition: ServerListResponse.cpp:19
ServerListResponse()
Definition: ServerListResponse.h:27
Definition: AuthEvents.h:36
Definition: ServerListResponse.h:22
Definition: ServerListResponse.h:12
Definition: Buffer.h:17
uint16_t max_players
Definition: ServerListResponse.h:18
void serializefrom(GrowingBuffer &buf)
Definition: ServerListResponse.cpp:39
uint8_t online
Definition: ServerListResponse.h:19
void set_server_list(const std::deque< GameServerInfo > &srv)
Definition: ServerListResponse.h:29
uint32_t addr
Definition: ServerListResponse.h:15
uint16_t port
Definition: ServerListResponse.h:16
Definition: AuthEvents.h:15