WebSocket protocol support can now be configured and is only used in the dedicated server.

This commit is contained in:
lotodore
2013-10-03 00:41:07 +02:00
parent d23cc87c93
commit 04abfb658d
7 changed files with 23 additions and 9 deletions
+3 -2
View File
@@ -78,7 +78,7 @@ ServerManager::~ServerManager()
}
void
ServerManager::Init(unsigned serverPort, bool ipv6, ServerTransportProtocol proto, const string &logDir)
ServerManager::Init(unsigned serverPort, unsigned websocketPort, bool ipv6, int proto, const string &logDir)
{
GetLobbyThread().Init(logDir);
@@ -93,9 +93,10 @@ ServerManager::Init(unsigned serverPort, bool ipv6, ServerTransportProtocol prot
sctpAcceptHelper->Listen(serverPort, ipv6, logDir, m_lobbyThread);
m_acceptHelperPool.push_back(sctpAcceptHelper);
}*/
if (proto & TRANSPORT_PROTOCOL_WEBSOCKET)
{
boost::shared_ptr<ServerAcceptInterface> webAcceptHelper(new ServerAcceptWebHelper(GetGui(), m_ioService));
webAcceptHelper->Listen(7233, true, logDir, m_lobbyThread);
webAcceptHelper->Listen(websocketPort, ipv6, logDir, m_lobbyThread);
m_acceptHelperPool.push_back(webAcceptHelper);
}
}