WebSocket protocol support can now be configured and is only used in the dedicated server.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ ServerManagerIrc::~ServerManagerIrc()
|
||||
}
|
||||
|
||||
void
|
||||
ServerManagerIrc::Init(unsigned serverPort, bool ipv6, ServerTransportProtocol proto, const string &logDir)
|
||||
ServerManagerIrc::Init(unsigned serverPort, unsigned websocketPort, bool ipv6, int proto, const string &logDir)
|
||||
{
|
||||
boost::shared_ptr<IrcThread> tmpIrcAdminThread;
|
||||
boost::shared_ptr<IrcThread> tmpIrcLobbyThread;
|
||||
@@ -83,7 +83,7 @@ ServerManagerIrc::Init(unsigned serverPort, bool ipv6, ServerTransportProtocol p
|
||||
|
||||
m_adminBot->Init(m_lobbyThread, tmpIrcAdminThread, myConfig.readConfigString("CacheDir"));
|
||||
m_lobbyBot->Init(m_lobbyThread, tmpIrcLobbyThread);
|
||||
ServerManager::Init(serverPort, ipv6, proto, logDir);
|
||||
ServerManager::Init(serverPort, websocketPort, ipv6, proto, logDir);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
virtual ~ServerManager();
|
||||
|
||||
// Set the parameters.
|
||||
virtual void Init(unsigned serverPort, bool ipv6, ServerTransportProtocol proto, const std::string &logDir);
|
||||
virtual void Init(unsigned serverPort, unsigned websocketPort, bool ipv6, int proto, const std::string &logDir);
|
||||
|
||||
// Main start function.
|
||||
virtual void RunAll();
|
||||
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
virtual ~ServerManagerIrc();
|
||||
|
||||
// Set the parameters.
|
||||
virtual void Init(unsigned serverPort, bool ipv6, ServerTransportProtocol proto, const std::string &logDir);
|
||||
virtual void Init(unsigned serverPort, unsigned websocketPort, bool ipv6, int proto, const std::string &logDir);
|
||||
|
||||
// Main start function.
|
||||
virtual void RunAll();
|
||||
|
||||
Reference in New Issue
Block a user