提交 751e2dac 编写于 作者: Y youngwolf

Fix -- in Windows, a TCP client must explicitly specify a full IP address (not...

Fix -- in Windows, a TCP client must explicitly specify a full IP address (not only the port) to connect to.
上级 dc107798
......@@ -66,7 +66,11 @@ public:
virtual void reset() {need_reconnect = ASCS_RECONNECT; super::reset();}
#ifdef _MSC_VER
bool set_server_addr(unsigned short port, const std::string& ip = ASCS_SERVER_IP) {return set_addr(server_addr, port, ip.empty() ? ASCS_SERVER_IP : ip);}
#else
bool set_server_addr(unsigned short port, const std::string& ip = ASCS_SERVER_IP) {return set_addr(server_addr, port, ip);}
#endif
bool set_server_addr(const std::string& file_name) {server_addr = typename Family::endpoint(file_name); return true;}
const typename Family::endpoint& get_server_addr() const {return server_addr;}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册