Last change
on this file since 999 was
918,
checked in by rgrieder, 17 years ago
|
- created basic construct for the InputHandler (mere copy of InputManager but without the Listeners)
- some msvc related fixes with winsocks.h and winsocks2.h
- fix in Tickable.h (due to lazy displacement to new folder)
|
File size:
1.1 KB
|
Line | |
---|
1 | // |
---|
2 | // C++ Interface: Server |
---|
3 | // |
---|
4 | // Description: |
---|
5 | // |
---|
6 | // |
---|
7 | // Author: Oliver Scheuss, (C) 2007 |
---|
8 | // |
---|
9 | // Copyright: See COPYING file that comes with this distribution |
---|
10 | // |
---|
11 | // |
---|
12 | |
---|
13 | #ifndef _Server_H__ |
---|
14 | #define _Server_H__ |
---|
15 | |
---|
16 | #include <string> |
---|
17 | |
---|
18 | #include "NetworkPrereqs.h" |
---|
19 | |
---|
20 | #include "core/Tickable.h" |
---|
21 | #include "PacketManager.h" |
---|
22 | |
---|
23 | |
---|
24 | |
---|
25 | namespace network |
---|
26 | { |
---|
27 | /** |
---|
28 | * This class is the root class of the network module for a server. |
---|
29 | * It implements all functions necessary for a Server |
---|
30 | */ |
---|
31 | class _NetworkExport Server : public PacketDecoder, public orxonox::Tickable{ |
---|
32 | public: |
---|
33 | Server(); |
---|
34 | Server(int port, std::string bindAddress); |
---|
35 | Server(int port, const char *bindAddress); |
---|
36 | void open(); |
---|
37 | void close(); |
---|
38 | bool sendMSG(std::string msg); |
---|
39 | bool sendMSG(const char *msg); |
---|
40 | void tick(float time); |
---|
41 | protected: |
---|
42 | void processQueue(); |
---|
43 | void updateGamestate(); |
---|
44 | private: |
---|
45 | bool sendGameState(); |
---|
46 | void processAck( ack *data, int clientID); |
---|
47 | ConnectionManager *connection; |
---|
48 | GameStateManager *gamestates; |
---|
49 | PacketGenerator packet_gen; |
---|
50 | |
---|
51 | ClientInformation *clients; |
---|
52 | }; |
---|
53 | |
---|
54 | |
---|
55 | |
---|
56 | |
---|
57 | } |
---|
58 | |
---|
59 | #endif /* _Server_H__ */ |
---|
Note: See
TracBrowser
for help on using the repository browser.