[Server] Add a servatrice-dev executable on the in-memory database (#7864)

This commit is contained in:
BruebachL 2026-11-10 12:16:36 +01:00 • committed by GitHub
parent a6d5dd5275
commit 15d69eb929
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 358 additions and 27 deletions

View file

@ -261,7 +261,7 @@ void Servatrice_IslServer::incomingConnection(qintptr socketDescriptor)
}
Servatrice::Servatrice(QObject *parent)
: Server(parent), authenticationMethod(AuthenticationNone), uptime(0), txBytes(0), rxBytes(0),
: Server(parent), authenticationMethod(AuthenticationNone), gameServer(nullptr), uptime(0), txBytes(0), rxBytes(0),
shutdownTimer(nullptr)
{
}
@ -319,6 +319,11 @@ Server_DatabaseInterface *Servatrice::createMainDatabaseInterface()
return new Servatrice_DatabaseInterface(-1, this);
}
int Servatrice::getGameServerPort() const
{
return gameServer != nullptr && gameServer->isListening() ? gameServer->serverPort() : -1;
}
bool Servatrice::initServer()
{