mirror of
https://github.com/glest/glest-source.git
synced 2025-10-02 02:16:40 +02:00
Added a new menu item in join menu and added a threaded callback system for clients when searching for servers so that the UI doesn't wait for responses
This commit is contained in:
@@ -560,14 +560,19 @@ void ClientInterface::close()
|
||||
clientSocket= NULL;
|
||||
}
|
||||
|
||||
std::vector<string> ClientInterface::discoverServers() {
|
||||
void ClientInterface::discoverServers(DiscoveredServersInterface *cb) {
|
||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
|
||||
std::vector<string> serverList = ClientSocket::discoverServers();
|
||||
ClientSocket::discoverServers(cb);
|
||||
|
||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
}
|
||||
void ClientInterface::stopServerDiscovery() {
|
||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
|
||||
return serverList;
|
||||
ClientSocket::stopBroadCastClientThread();
|
||||
|
||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user