SEGS  0.6.1-develop [d2cac982]
Super Entity Game Server
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 - 2019 SEGS Team (see AUTHORS.md)
5  * This software is licensed under the terms of the 3-clause BSD License. See LICENSE.md for details.
6  */
7 
8 #pragma once
9 #include "Auth/AuthEvents.h"
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  template <class Archive>
21  void serialize( Archive & ar )
22  {
23  ar( id, addr, port,current_players, max_players,online );
24  }
25 };
26 
27 namespace SEGSEvents
28 {
29 // [[ev_def:type]]
31 {
32 public:
33  // [[ev_def:field]]
34  std::deque<GameServerInfo> m_serv_list;
35  // [[ev_def:field]]
38  {}
39  void set_server_list(const std::deque<GameServerInfo> &srv) {m_serv_list=srv;}
40  void serializeto(GrowingBuffer &buf) const override;
41  void serializefrom(GrowingBuffer &buf) override;
43 };
44 } // end of namespace SEGSEvents
uint8_t id
Definition: ServerListResponse.h:14
std::deque< GameServerInfo > m_serv_list
Definition: ServerListResponse.h:34
uint16_t current_players
Definition: ServerListResponse.h:17
void set_server_list(const std::deque< GameServerInfo > &srv)
Definition: ServerListResponse.h:39
Definition: AuthEvents.h:39
Definition: LinkLevelEvent.h:13
uint8_t m_preferred_server_idx
Definition: ServerListResponse.h:36
Definition: ServerListResponse.h:12
Definition: Buffer.h:17
uint16_t max_players
Definition: ServerListResponse.h:18
#define EVENT_IMPL(name)
Definition: SEGSEvent.h:77
void serialize(Archive &ar)
Definition: ServerListResponse.h:21
uint8_t online
Definition: ServerListResponse.h:19
void serializefrom(CostumePart &part, BitStream &bs, const ColorAndPartPacker *packingContext)
Definition: Costume.cpp:68
uint32_t addr
Definition: ServerListResponse.h:15
uint16_t port
Definition: ServerListResponse.h:16
ServerListResponse()
Definition: ServerListResponse.h:37
Definition: ServerListResponse.h:30
Definition: AuthEvents.h:18
void serializeto(const CostumePart &part, BitStream &bs, const ColorAndPartPacker *packingContext)
Definition: Costume.cpp:42