Emergency 20 Dokumentation  4.2.0
NetworkClient.h
Go to the documentation of this file.
1 // Copyright (C) 2012-2018 Promotion Software GmbH
2 
3 
4 //[-------------------------------------------------------]
5 //[ Header guard ]
6 //[-------------------------------------------------------]
7 #pragma once
8 
9 
10 //[-------------------------------------------------------]
11 //[ Includes ]
12 //[-------------------------------------------------------]
13 #include "em5/Export.h"
15 
16 
17 //[-------------------------------------------------------]
18 //[ Forward declarations ]
19 //[-------------------------------------------------------]
20 namespace qsf
21 {
22  namespace game
23  {
24  class ServerConnection;
25  }
26 }
27 
28 
29 //[-------------------------------------------------------]
30 //[ Namespace ]
31 //[-------------------------------------------------------]
32 namespace em5
33 {
34  namespace multiplayer
35  {
36  namespace server
37  {
38 
39 
40  //[-------------------------------------------------------]
41  //[ Classes ]
42  //[-------------------------------------------------------]
48  {
49 
50 
51  //[-------------------------------------------------------]
52  //[ Public methods ]
53  //[-------------------------------------------------------]
54  public:
62  explicit NetworkClient(qsf::game::ServerConnection& serverConnection);
63 
68  virtual ~NetworkClient();
69 
70 
71  //[-------------------------------------------------------]
72  //[ Public virtual em5::multiplayer::client::ClientBase methods ]
73  //[-------------------------------------------------------]
74  public:
75  virtual void disconnect() override;
76  virtual void disconnect(bool force) override;
77  virtual uint64 getId() const override;
78  virtual bool sendData(const qsf::Clock& simulationClock, const qsf::game::BitStream& bitStream) override;
79  virtual bool sendData(const qsf::game::BitStream& bitStream) override;
80 
81 
82  //[-------------------------------------------------------]
83  //[ Private methods ]
84  //[-------------------------------------------------------]
85  private:
86  void onServerClientPacketReceived(const qsf::game::BitStream& bitStream, uint32 sequenceNumber);
87 
88 
89  //[-------------------------------------------------------]
90  //[ Private data ]
91  //[-------------------------------------------------------]
92  private:
93  qsf::game::ServerConnection& mServerConnection;
94  boost::signals2::connection mPacketReceivedConnection;
95 
96 
97  };
98 
99 
100 //[-------------------------------------------------------]
101 //[ Namespace ]
102 //[-------------------------------------------------------]
103  } // server
104  } // multiplayer
105 } // em5
Definition: ActionPriority.h:13
unsigned int uint32
Definition: PlatformTypes.h:181
Clock class.
Definition: Clock.h:33
#define EM5_API_EXPORT
Definition: Export.h:28
EMERGENCY 5 multiplayer client base class (represents a client on the server side) ...
Definition: ClientBase.h:52
uint64_t uint64
Definition: PlatformTypes.h:184
Game bit stream class (just a wrapper for linnet bit stream)
Definition: BitStream.h:40
Definition: PickupPersonByParamedicAction.h:21
Game server connection class.
Definition: ServerConnection.h:48
EMERGENCY 5 multiplayer network client (server side multiplayer client instance)
Definition: NetworkClient.h:47