source:
code/branches/FICN/src/network/Server.h
@
934
Last change on this file since 934 was 777, checked in by rgrieder, 17 years ago | |
---|---|
File size: 1.0 KB |
Rev | Line | |
---|---|---|
[230] | 1 | // |
2 | // C++ Interface: Server | |
3 | // | |
[285] | 4 | // Description: |
[230] | 5 | // |
6 | // | |
7 | // Author: Oliver Scheuss, (C) 2007 | |
8 | // | |
9 | // Copyright: See COPYING file that comes with this distribution | |
10 | // | |
11 | // | |
12 | ||
[673] | 13 | #ifndef _Server_H__ |
14 | #define _Server_H__ | |
[230] | 15 | |
16 | #include <string> | |
17 | ||
[285] | 18 | #include "PacketManager.h" |
[777] | 19 | #include "NetworkPrereqs.h" |
[230] | 20 | |
[777] | 21 | namespace network |
22 | { | |
[230] | 23 | /** |
[777] | 24 | * This class is the root class of the network module for a server. |
25 | * It implements all functions necessary for a Server | |
26 | */ | |
27 | class _NetworkExport Server : public PacketDecoder{ | |
28 | public: | |
[230] | 29 | Server(); |
30 | Server(int port, std::string bindAddress); | |
31 | Server(int port, const char *bindAddress); | |
[369] | 32 | void open(); |
33 | void close(); | |
34 | bool sendMSG(std::string msg); | |
35 | bool sendMSG(const char *msg); | |
[459] | 36 | void tick(float time); |
[777] | 37 | protected: |
[440] | 38 | void processQueue(); |
39 | void updateGamestate(); | |
[777] | 40 | private: |
[422] | 41 | bool sendGameState(); |
[620] | 42 | void processAck( ack *data, int clientID); |
[436] | 43 | ConnectionManager *connection; |
44 | GameStateManager *gamestates; | |
[369] | 45 | PacketGenerator packet_gen; |
[777] | 46 | |
[436] | 47 | ClientInformation *clients; |
[230] | 48 | }; |
[285] | 49 | |
50 | ||
51 | ||
[777] | 52 | |
[230] | 53 | } |
54 | ||
[673] | 55 | #endif /* _Server_H__ */ |
Note: See TracBrowser
for help on using the repository browser.