Game configuration now placed in a struct. Prepared to send/receive game configuration over tcp.

This commit is contained in:
lotodore
2007-04-26 23:07:08 +00:00
parent e202a83fbc
commit 29b6050ee1
16 changed files with 133 additions and 37 deletions
+4 -2
View File
@@ -41,7 +41,8 @@ ServerThread::~ServerThread()
}
void
ServerThread::Init(unsigned serverPort, bool ipv6, const std::string &pwd)
ServerThread::Init(unsigned serverPort, bool ipv6, const std::string &pwd,
const GameData &gameData)
{
if (IsRunning())
return; // TODO: throw exception
@@ -50,7 +51,8 @@ ServerThread::Init(unsigned serverPort, bool ipv6, const std::string &pwd)
context.SetAddrFamily(ipv6 ? AF_INET6 : AF_INET);
context.SetServerPort(serverPort);
context.SetPassword(pwd);
GetRecvThread().Init(pwd, gameData);
}
void