mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-10 03:53:26 -08:00
[Server] Add a servatrice-dev executable on the in-memory database (#7864)
This commit is contained in:
parent
a6d5dd5275
commit
15d69eb929
8 changed files with 358 additions and 27 deletions
|
|
@ -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()
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -259,6 +259,8 @@ public:
|
|||
{
|
||||
return getAuthenticationStrictness() == AuthenticationStrict;
|
||||
}
|
||||
/** @brief The port the game server listens on, or -1 when it is not listening. */
|
||||
int getGameServerPort() const;
|
||||
/** @brief Key sealing legacy password backups, or empty when they are disabled. */
|
||||
QByteArray getLegacyBackupKey() const;
|
||||
/** @brief Days a legacy password backup may go unused before it is purged. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue