i6engine  1.0
NetworkConfig.h
Go to the documentation of this file.
1 /*
2  * i6engine
3  * Copyright (2016) Daniel Bonrath, Michael Baer, All rights reserved.
4  *
5  * This file is part of i6engine; i6engine is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19 
25 #ifndef __I6ENGINE_API_NETWORKCONFIG_H__
26 #define __I6ENGINE_API_NETWORKCONFIG_H__
27 
30 
31 #include "boost/shared_ptr.hpp"
32 
33 namespace i6e {
34 namespace api {
35 namespace network {
37  NetReset = 0,
48  };
49 
54  std::vector<GameMessage::Ptr> messages;
57  Administration_GameState_Create(const core::IPKey & r, const std::vector<GameMessage::Ptr> & msgs);
58  template<class Archive>
59  void serialize(Archive & ar, const unsigned int) {
60  ar & boost::serialization::base_object<GameMessageStruct>(*this);
61  ar & messages;
62  ar & receiver;
63  }
66 
71  uint64_t time;
74  Network_Ping_Update(const core::IPKey & r, uint64_t time);
75  template<class Archive>
76  void serialize(Archive & ar, const unsigned int) {
77  ar & boost::serialization::base_object<GameMessageStruct>(*this);
78  ar & time;
79  ar & receiver;
80  }
81  Network_Ping_Update * copy() { return new Network_Ping_Update(*this); }
83 
88  uint64_t ping;
91  Network_Pingtime_Update(const core::IPKey & c, uint64_t p);
92  template<class Archive>
93  void serialize(Archive & ar, const unsigned int) {
94  ar & boost::serialization::base_object<GameMessageStruct>(*this);
95  ar & ping;
96  ar & client;
97  }
100 
105  uint64_t ping;
106  uint64_t time;
109  }
110  Network_TimeSynchro_Update(const core::IPKey & r, uint64_t p, uint64_t t);
111  template<class Archive>
112  void serialize(Archive & ar, const unsigned int) {
113  ar & boost::serialization::base_object<GameMessageStruct>(*this);
114  ar & ping;
115  ar & time;
116  ar & receiver;
117  }
119  return new Network_TimeSynchro_Update(*this);
120  }
122 
127  bool enable;
130  template<class Archive>
131  void serialize(Archive & ar, const unsigned int) {
132  ar & boost::serialization::base_object<GameMessageStruct>(*this);
133  ar & enable;
134  }
137 
142  std::string text;
144  }
145  Network_ChatMessage(const std::string & t);
146  template<class Archive>
147  void serialize(Archive & ar, const unsigned int) {
148  ar & boost::serialization::base_object<GameMessageStruct>(*this);
149  ar & text;
150  }
152  return new Network_ChatMessage(*this);
153  }
155 
156 } /* namespace network */
157 } /* namespace api */
158 } /* namespace i6e */
159 
161 BOOST_CLASS_EXPORT_KEY(i6e::api::network::Network_Ping_Update)
162 BOOST_CLASS_EXPORT_KEY(i6e::api::network::Network_Pingtime_Update)
163 BOOST_CLASS_EXPORT_KEY(i6e::api::network::Network_PingEnable_Update)
164 BOOST_CLASS_EXPORT_KEY(i6e::api::network::Network_TimeSynchro_Update)
165 BOOST_CLASS_EXPORT_KEY(i6e::api::network::Network_ChatMessage)
166 
167 #endif /* __I6ENGINE_API_NETWORKCONFIG_H__ */
168 
i6e::api::network::Network_Pingtime_Update Network_Pingtime_Update
synchronization message to update players ping visualization
void serialize(Archive &ar, const unsigned int)
#define ISIXE_MODULES_API
Network_PingEnable_Update * copy()
Copy method returning an exact copy of itself.
Network_Ping_Update * copy()
Copy method returning an exact copy of itself.
Definition: NetworkConfig.h:81
sends ping message to all clients containing send time
Definition: NetworkConfig.h:70
Network_Pingtime_Update * copy()
Copy method returning an exact copy of itself.
Definition: NetworkConfig.h:98
message containing a list of all GameObjects the server contains
Definition: NetworkConfig.h:53
synchronization message to update players ping visualization
Definition: NetworkConfig.h:87
i6e::api::network::Network_Ping_Update Network_Ping_Update
sends ping message to all clients containing send time
Network_TimeSynchro_Update * copy()
Copy method returning an exact copy of itself.
void serialize(Archive &ar, const unsigned int)
Definition: NetworkConfig.h:76
i6e::api::network::Network_PingEnable_Update Network_PingEnable_Update
sets activation state of pinging
Administration_GameState_Create * copy()
Copy method returning an exact copy of itself.
Definition: NetworkConfig.h:64
sends a text message to other subscribers
i6e::api::network::Network_ChatMessage Network_ChatMessage
sends a text message to other subscribers
sets activation state of pinging
void serialize(Archive &ar, const unsigned int)
Definition: NetworkConfig.h:93
i6e::api::network::Network_TimeSynchro_Update Network_TimeSynchro_Update
synchronization message to update application time at client
void serialize(Archive &ar, const unsigned int)
Definition: NetworkConfig.h:59
Network_ChatMessage * copy()
Copy method returning an exact copy of itself.
std::vector< GameMessage::Ptr > messages
Definition: NetworkConfig.h:54
i6e::api::network::Administration_GameState_Create Administration_GameState_Create
message containing a list of all GameObjects the server contains
synchronization message to update application time at client
void serialize(Archive &ar, const unsigned int)
void serialize(Archive &ar, const unsigned int)