#include <server.h>
Signals | |
| void | pingClockTimeout () |
| void | sigSendIslMessage (const IslMessage &message, int serverId) |
| void | endSession (qint64 sessionId) |
Public Member Functions | |
| Server (QObject *parent=nullptr) | |
| ~Server () override=default | |
| AuthenticationResult | loginUser (Server_ProtocolHandler *session, QString &name, const QString &password, bool passwordNeedsHash, QString &reason, int &secondsLeft, QString &clientid, QString &clientVersion, QString &connectionType) |
| const QMap< int, Server_Room * > & | getRooms () |
| Server_AbstractUserInterface * | findUser (const QString &userName) const |
| const QMap< QString, Server_ProtocolHandler * > & | getUsers () const |
| const QMap< qint64, Server_ProtocolHandler * > & | getUsersBySessionId () const |
| virtual QMap< QString, bool > | getServerRequiredFeatureList () const |
| void | addClient (Server_ProtocolHandler *player) |
| void | removeClient (Server_ProtocolHandler *player) |
| QList< QString > | getOnlineModeratorList () const |
| virtual QString | getLoginMessage () const |
| virtual QString | getRequiredFeatures () const |
| virtual bool | permitUnregisteredUsers () const |
| virtual bool | getGameShouldPing () const |
| virtual bool | getClientIDRequiredEnabled () const |
| virtual bool | getRegOnlyServerEnabled () const |
| virtual bool | getMaxUserLimitEnabled () const |
| virtual bool | getEnableLogQuery () const |
| virtual bool | getStoreReplaysEnabled () const |
| virtual int | getIdleClientTimeout () const |
| virtual int | getClientKeepAlive () const |
| virtual int | getMaxGameInactivityTime () const |
| virtual int | getMaxPlayerInactivityTime () const |
| virtual int | getMessageCountingInterval () const |
| virtual int | getMaxMessageCountPerInterval () const |
| virtual int | getMaxMessageSizePerInterval () const |
| virtual int | getMaxGamesPerUser () const |
| virtual int | getCommandCountingInterval () const |
| virtual int | getMaxCommandCountPerInterval () const |
| virtual int | getMaxUserTotal () const |
| virtual int | getServerID () const |
| virtual bool | permitCreateGameAsJudge () const |
| Server_DatabaseInterface * | getDatabaseInterface () const |
| int | getNextLocalGameId () |
| void | sendIsl_Response (const Response &item, int serverId=-1, qint64 sessionId=-1) |
| void | sendIsl_SessionEvent (const SessionEvent &item, int serverId=-1, qint64 sessionId=-1) |
| void | sendIsl_GameEventContainer (const GameEventContainer &item, int serverId=-1, qint64 sessionId=-1) |
| void | sendIsl_RoomEvent (const RoomEvent &item, int serverId=-1, qint64 sessionId=-1) |
| void | sendIsl_GameCommand (const CommandContainer &item, int serverId, qint64 sessionId, int roomId, int playerId) |
| void | sendIsl_RoomCommand (const CommandContainer &item, int serverId, qint64 sessionId, int roomId) |
| const QMap< QString, Server_AbstractUserInterface * > & | getExternalUsers () const |
| void | addPersistentPlayer (const QString &userName, int roomId, int gameId, int playerId) |
| void | removePersistentPlayer (const QString &userName, int roomId, int gameId, int playerId) |
| QList< PlayerReference > | getPersistentPlayerReferences (const QString &userName) const |
| int | getUsersCount () const |
| int | getGamesCount () const |
| int | getTCPUserCount () const |
| int | getWebSocketUserCount () const |
Public Attributes | |
| QReadWriteLock | clientsLock |
| QReadWriteLock | roomsLock |
Protected Slots | |
| void | externalUserJoined (const ServerInfo_User &userInfo) |
| void | externalUserLeft (const QString &userName) |
| void | externalRoomUserJoined (int roomId, const ServerInfo_User &userInfo) |
| void | externalRoomUserLeft (int roomId, const QString &userName) |
| void | externalRoomSay (int roomId, const QString &userName, const QString &message) |
| void | externalRoomRemoveMessages (int roomId, const QString &userName, int amount) |
| void | externalRoomGameListChanged (int roomId, const ServerInfo_Game &gameInfo) |
| void | externalJoinGameCommandReceived (const Command_JoinGame &cmd, int cmdId, int roomId, int serverId, qint64 sessionId) |
| void | externalGameCommandContainerReceived (const CommandContainer &cont, int playerId, int serverId, qint64 sessionId) |
| void | externalGameEventContainerReceived (const GameEventContainer &cont, qint64 sessionId) |
| void | externalResponseReceived (const Response &resp, qint64 sessionId) |
| virtual void | doSendIslMessage (const IslMessage &, int) |
Protected Member Functions | |
| void | prepareDestroy () |
| void | setDatabaseInterface (Server_DatabaseInterface *_databaseInterface) |
| void | addRoom (Server_Room *newRoom) |
Protected Attributes | |
| QList< Server_ProtocolHandler * > | clients |
| QMap< qint64, Server_ProtocolHandler * > | usersBySessionId |
| QMap< QString, Server_ProtocolHandler * > | users |
| QMap< qint64, Server_AbstractUserInterface * > | externalUsersBySessionId |
| QMap< QString, Server_AbstractUserInterface * > | externalUsers |
| QMap< int, Server_Room * > | rooms |
| QMap< QThread *, Server_DatabaseInterface * > | databaseInterfaces |
Private Slots | |
| void | broadcastRoomUpdate (const ServerInfo_Room &roomInfo, bool sendToIsl=false) |
Private Attributes | |
| QMultiMap< QString, PlayerReference > | persistentPlayers |
| QReadWriteLock | persistentPlayersLock |
| int | nextLocalGameId |
| int | tcpUserCount |
| int | webSocketUserCount |
| QMutex | nextLocalGameIdMutex |
|
explicit |
|
overridedefault |
| void Server::addClient | ( | Server_ProtocolHandler * | player | ) |
| void Server::addPersistentPlayer | ( | const QString & | userName, |
| int | roomId, | ||
| int | gameId, | ||
| int | playerId ) |
|
protected |
|
privateslot |
|
inlineprotectedvirtualslot |
|
signal |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protectedslot |
| Server_AbstractUserInterface * Server::findUser | ( | const QString & | userName | ) | const |
|
inlinevirtual |
|
inlinevirtual |
Reimplemented in Servatrice.
|
inlinevirtual |
Reimplemented in Servatrice.
| Server_DatabaseInterface * Server::getDatabaseInterface | ( | ) | const |
|
inlinevirtual |
Reimplemented in Servatrice.
|
inline |
| int Server::getGamesCount | ( | ) | const |
|
inlinevirtual |
Reimplemented in Servatrice.
|
inlinevirtual |
Reimplemented in Servatrice.
|
inlinevirtual |
Reimplemented in Servatrice.
|
inlinevirtual |
Reimplemented in Servatrice.
|
inlinevirtual |
Reimplemented in Servatrice.
|
inlinevirtual |
Reimplemented in Servatrice.
|
inlinevirtual |
Reimplemented in Servatrice.
|
inlinevirtual |
Reimplemented in Servatrice.
|
inlinevirtual |
Reimplemented in Servatrice.
|
inlinevirtual |
Reimplemented in Servatrice.
|
inlinevirtual |
Reimplemented in Servatrice.
|
inlinevirtual |
Reimplemented in Servatrice.
|
inline |
| QList< QString > Server::getOnlineModeratorList | ( | ) | const |
| QList< PlayerReference > Server::getPersistentPlayerReferences | ( | const QString & | userName | ) | const |
|
inlinevirtual |
|
inlinevirtual |
Reimplemented in Servatrice.
|
inline |
|
inlinevirtual |
Reimplemented in Servatrice.
|
inlinevirtual |
Reimplemented in Servatrice.
|
inlinevirtual |
|
inline |
|
inline |
|
inline |
| int Server::getUsersCount | ( | ) | const |
|
inline |
| AuthenticationResult Server::loginUser | ( | Server_ProtocolHandler * | session, |
| QString & | name, | ||
| const QString & | password, | ||
| bool | passwordNeedsHash, | ||
| QString & | reason, | ||
| int & | secondsLeft, | ||
| QString & | clientid, | ||
| QString & | clientVersion, | ||
| QString & | connectionType ) |
|
inlinevirtual |
Reimplemented in Servatrice.
|
inlinevirtual |
Reimplemented in Servatrice.
|
signal |
|
protected |
| void Server::removeClient | ( | Server_ProtocolHandler * | player | ) |
| void Server::removePersistentPlayer | ( | const QString & | userName, |
| int | roomId, | ||
| int | gameId, | ||
| int | playerId ) |
| void Server::sendIsl_GameCommand | ( | const CommandContainer & | item, |
| int | serverId, | ||
| qint64 | sessionId, | ||
| int | roomId, | ||
| int | playerId ) |
| void Server::sendIsl_GameEventContainer | ( | const GameEventContainer & | item, |
| int | serverId = -1, | ||
| qint64 | sessionId = -1 ) |
| void Server::sendIsl_Response | ( | const Response & | item, |
| int | serverId = -1, | ||
| qint64 | sessionId = -1 ) |
| void Server::sendIsl_RoomCommand | ( | const CommandContainer & | item, |
| int | serverId, | ||
| qint64 | sessionId, | ||
| int | roomId ) |
| void Server::sendIsl_RoomEvent | ( | const RoomEvent & | item, |
| int | serverId = -1, | ||
| qint64 | sessionId = -1 ) |
| void Server::sendIsl_SessionEvent | ( | const SessionEvent & | item, |
| int | serverId = -1, | ||
| qint64 | sessionId = -1 ) |
|
protected |
|
signal |
|
protected |
|
mutable |
|
protected |
|
protected |
|
protected |
|
private |
|
private |
|
private |
|
mutableprivate |
|
protected |
| QReadWriteLock Server::roomsLock |
|
private |
|
protected |
|
protected |
|
private |