Initial handshake and network game start. Works with multiple clients. Not yet stable, because it is not thread-safe. GUI callbacks not complete yet (server dialog not updated).
This commit is contained in:
+9
-2
@@ -85,14 +85,21 @@ void Session::startNetworkServer()
|
||||
{
|
||||
if (myNetServer)
|
||||
return; // TODO: throw exception
|
||||
myNetServer = new ServerThread();
|
||||
myNetServer = new ServerThread(*myGui);
|
||||
myNetServer->Init(
|
||||
myConfig->readConfigInt("ServerPort"),
|
||||
myConfig->readConfigInt("ServerUseIpv6") == 1,
|
||||
"");
|
||||
""); // TODO: use pwd
|
||||
myNetServer->Run();
|
||||
}
|
||||
|
||||
void Session::initiateNetworkServerGame()
|
||||
{
|
||||
if (!myNetServer)
|
||||
return; // TODO: throw exception
|
||||
myNetServer->StartGame();
|
||||
}
|
||||
|
||||
void Session::terminateNetworkServer()
|
||||
{
|
||||
if (!myNetServer)
|
||||
|
||||
Reference in New Issue
Block a user