mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 16:24:45 -07:00
Client Websockets (#3545)
* Websockets * Add setting to get websocket IP from header * Add QT version guard * Minor cleanup Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com> * - Make QWebSocket required - Remove QWEBSOCEKT_LIB guards - Only TCP on port 4747 - Fix peerName lookup * fix check Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com> * Update CMakeLists.txt * Update CMakeLists.txt
This commit is contained in:
parent
5e38214675
commit
9a8c81cf5e
8 changed files with 130 additions and 77 deletions
|
|
@ -104,7 +104,6 @@ Servatrice_ConnectionPool *Servatrice_GameServer::findLeastUsedConnectionPool()
|
|||
return connectionPools[poolIndex];
|
||||
}
|
||||
|
||||
#ifdef QT_WEBSOCKETS_LIB
|
||||
#define WEBSOCKET_POOL_NUMBER 999
|
||||
|
||||
Servatrice_WebsocketGameServer::Servatrice_WebsocketGameServer(Servatrice *_server,
|
||||
|
|
@ -163,7 +162,6 @@ Servatrice_ConnectionPool *Servatrice_WebsocketGameServer::findLeastUsedConnecti
|
|||
qDebug() << "Pool utilisation:" << debugStr;
|
||||
return connectionPools[poolIndex];
|
||||
}
|
||||
#endif
|
||||
|
||||
void Servatrice_IslServer::incomingConnection(qintptr socketDescriptor)
|
||||
{
|
||||
|
|
@ -431,7 +429,6 @@ bool Servatrice::initServer()
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef QT_WEBSOCKETS_LIB
|
||||
// WEBSOCKET SERVER
|
||||
if (getNumberOfWebSocketPools() > 0) {
|
||||
websocketGameServer = new Servatrice_WebsocketGameServer(this, getNumberOfWebSocketPools(),
|
||||
|
|
@ -447,7 +444,6 @@ bool Servatrice::initServer()
|
|||
return false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (getIdleClientTimeout() > 0) {
|
||||
qDebug() << "Idle client timeout value: " << getIdleClientTimeout();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue