00001 #ifndef CLIENT_H 00002 #define CLIENT_H 00003 #include <string> 00004 #include "engine/mutex.h" 00005 #include "net/client_common.h" 00006 #include "tools/conversion.h" 00007 00008 class Client : public ClientCommon 00009 { 00010 private: 00011 bool connecting; 00012 bool connected; 00013 Mutex info_mutex; 00014 00015 void Connect(); 00016 protected: 00017 void Reconnect() { Connect(); } 00018 00019 public: 00020 Client(bool _reconnect = true); 00021 virtual ~Client(); 00022 const std::string GetAddress(); 00023 bool IsConnecting(); 00024 bool IsConnected(); 00025 void OnDisconnect(); 00026 void Connect(std::string _host, int _port); 00027 }; 00028 00029 #endif
1.5.8