Changeset 1534 for code/trunk/src/network/Server.h
- Timestamp:
- Jun 4, 2008, 8:53:10 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/network/Server.h
r1505 r1534 53 53 namespace network 54 54 { 55 #define CLIENTID_SERVER 0 56 55 57 /** 56 58 * This class is the root class of the network module for a server. … … 59 61 class _NetworkExport Server : public PacketDecoder, public orxonox::Tickable{ 60 62 public: 61 Server(); 62 Server(int port); 63 Server(int port, std::string bindAddress); 64 Server(int port, const char *bindAddress); 63 static Server *createSingleton(); 64 static Server *createSingleton(int port); 65 static Server *createSingleton(int port, std::string bindAddress); 66 static Server *createSingleton(int port, const char *bindAddress); 67 68 static Server *getSingleton(); 69 65 70 void open(); 66 71 void close(); 67 bool send MSG(std::string msg);68 bool send MSG(const char *msg);72 bool sendChat(std::string msg); 73 bool sendChat(const char *msg); 69 74 void tick(float time); 70 75 protected: … … 72 77 void updateGamestate(); 73 78 private: 79 Server(); 80 Server(int port); 81 Server(int port, std::string bindAddress); 82 Server(int port, const char *bindAddress); 83 84 static Server *instance_; 85 74 86 bool addClient(ENetEvent *event); 75 87 bool createClient(int clientID); … … 82 94 bool processConnectRequest( connectRequest *con, int clientID ); 83 95 void processGamestate( GameStateCompressed *data, int clientID); 96 void processChat( chat *data, int clientId); 84 97 ConnectionManager *connection; 85 98 GameStateManager *gamestates;
Note: See TracChangeset
for help on using the changeset viewer.