Changeset 3214 for code/trunk/src/network/Server.h
- Timestamp:
- Jun 23, 2009, 6:02:25 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/network/Server.h
r3084 r3214 32 32 #include "NetworkPrereqs.h" 33 33 34 #include <string> 35 34 #include "core/CorePrereqs.h" 36 35 #include "Host.h" 37 #include " GamestateManager.h"36 #include "ServerConnection.h" 38 37 39 38 namespace orxonox … … 44 43 * It implements all functions necessary for a Server 45 44 */ 46 class _NetworkExport Server : public Host {45 class _NetworkExport Server : public Host, public ServerConnection{ 47 46 public: 48 47 Server(); 49 48 Server(int port); 50 49 Server(int port, const std::string& bindAddress); 51 Server(int port, const char *bindAddress);52 50 ~Server(); 53 51 … … 60 58 double getPacketLoss(unsigned int clientID); 61 59 protected: 62 void processQueue();63 60 void updateGamestate(); 64 61 private: … … 67 64 unsigned int playerID(){return 0;} 68 65 69 booladdClient(ENetEvent *event);66 void addClient(ENetEvent *event); 70 67 bool createClient(int clientID); 71 bool disconnectClient(ENetEvent *event);72 void disconnectClient(int clientID);73 68 void disconnectClient( ClientInformation *client); 74 69 bool processPacket( ENetPacket *packet, ENetPeer *peer ); … … 78 73 virtual bool broadcast(const std::string& message); 79 74 bool sendChat(const std::string& message, unsigned int clientID); 75 void syncClassid(unsigned int clientID); 80 76 81 //void processChat( chat *data, int clientId);82 ConnectionManager *connection;83 77 GamestateManager *gamestates_; 84 78
Note: See TracChangeset
for help on using the changeset viewer.