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