Changeset 1953 for code/branches/objecthierarchy/src/network/Client.h
- Timestamp:
- Oct 19, 2008, 9:50:36 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/network/Client.h
r1907 r1953 66 66 public: 67 67 Client(); 68 Client( std::stringaddress, int port);68 Client(const std::string& address, int port); 69 69 Client(const char *address, int port); 70 70 ~Client(); 71 71 72 72 bool establishConnection(); 73 73 bool closeConnection(); 74 74 bool queuePacket(ENetPacket *packet, int clientID); 75 bool processChat(std::string message, unsigned int playerID); 76 virtual bool chat(std::string message); 75 bool processChat(const std::string& message, unsigned int playerID); 76 virtual bool chat(const std::string& message); 77 virtual bool broadcast(const std::string& message) { return false; } 77 78 //bool sendChat(packet::Chat *chat); 78 79 // static void Chat( std::string message ); 80 81 //static void setShipID( unsigned int shipID){ dynamic_cast<Client *>(instance_)->shipID_=shipID; } 82 static void setClientID( unsigned int clientID){ dynamic_cast<Client *>(instance_)->clientID_=clientID; } 83 79 84 80 void tick(float time); 85 81 86 82 private: 87 83 virtual bool isServer_(){return false;} 88 84 89 85 ClientConnection client_connection; 90 86 GamestateClient gamestate; 91 87 bool isConnected; 92 88 bool isSynched_; 93 89 94 90 bool gameStateFailure_; 95 91 };
Note: See TracChangeset
for help on using the changeset viewer.