![]() |
Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
|
#include <server_protocolhandler.h>
Public Slots | |
| void | prepareDestroy () |
Public Member Functions | |
| Server_ProtocolHandler (Server *_server, Server_DatabaseInterface *_databaseInterface, QObject *parent=0) | |
| ~Server_ProtocolHandler () | |
| bool | getAcceptsUserListChanges () const |
| bool | getAcceptsRoomListChanges () const |
| virtual QString | getAddress () const =0 |
| virtual QString | getConnectionType () const =0 |
| Server_DatabaseInterface * | getDatabaseInterface () const |
| void | setAuthNonce (const QByteArray &nonce, const QString &userName) |
Store a fresh challenge nonce bound to userName for the next challenge-response login attempt. | |
| bool | isAuthNonceValid (const QByteArray &nonce, const QString &userName) const |
True if nonce matches the pending one, was issued for userName, and is less than 60 seconds old. | |
| void | clearAuthNonce () |
| Invalidate the pending nonce (single-use). | |
| int | getLastCommandTime () const |
| bool | addSaidMessageSize (int size) |
| virtual void | processCommandContainer (const CommandContainer &cont) |
| void | sendProtocolItem (const Response &item) |
| void | sendProtocolItem (const SessionEvent &item) |
| void | sendProtocolItem (const GameEventContainer &item) |
| void | sendProtocolItem (const RoomEvent &item) |
| Public Member Functions inherited from Server_AbstractUserInterface | |
| Server_AbstractUserInterface (Server *_server) | |
| Server_AbstractUserInterface (Server *_server, const ServerInfo_User_Container &other) | |
| ~Server_AbstractUserInterface () override | |
| void | playerRemovedFromGame (Server_Game *game) |
| void | playerAddedToGame (int gameId, int roomId, int playerId) |
| void | joinPersistentGames (ResponseContainer &rc) |
| virtual void | onLogin (ResponseContainer &rc) |
| QMap< int, QPair< int, int > > | getGames () const |
| void | sendProtocolItemByType (ServerMessage::MessageType type, const ::google::protobuf::Message &item) |
| void | sendResponseContainer (const ResponseContainer &responseContainer, Response::ResponseCode responseCode) |
| Public Member Functions inherited from ServerInfo_User_Container | |
| ServerInfo_User_Container (ServerInfo_User *_userInfo=nullptr) | |
| ServerInfo_User_Container (const ServerInfo_User &_userInfo) | |
| ServerInfo_User_Container (const ServerInfo_User_Container &other) | |
| ServerInfo_User_Container & | operator= (const ServerInfo_User_Container &other)=default |
| virtual | ~ServerInfo_User_Container () |
| ServerInfo_User * | getUserInfo () const |
| void | setUserInfo (const ServerInfo_User &_userInfo) |
| ServerInfo_User & | copyUserInfo (ServerInfo_User &result, bool complete, bool internalInfo=false, bool sessionInfo=false) const |
| ServerInfo_User | copyUserInfo (bool complete, bool internalInfo=false, bool sessionInfo=false) const |
Protected Member Functions | |
| virtual void | logDebugMessage (const QString &) |
Protected Attributes | |
| QMap< int, Server_Room * > | rooms |
| bool | deleted |
| Server_DatabaseInterface * | databaseInterface |
| AuthenticationResult | authState |
| bool | usingRealPassword |
| bool | acceptsUserListChanges |
| bool | acceptsRoomListChanges |
| bool | idleClientWarningSent |
| QByteArray | authNonce |
| QString | authNonceUser |
| QDateTime | authNonceCreated |
| Protected Attributes inherited from Server_AbstractUserInterface | |
| Server * | server |
| Protected Attributes inherited from ServerInfo_User_Container | |
| ServerInfo_User * | userInfo |
Private Slots | |
| void | pingClockTimeout () |
Private Attributes | |
| QList< int > | messageSizeOverTime |
| QList< int > | messageCountOverTime |
| QList< int > | commandCountOverTime |
| int | timeRunning |
| int | lastDataReceived |
| int | lastActionReceived |
Additional Inherited Members | |
| Static Public Member Functions inherited from Server_AbstractUserInterface | |
| static SessionEvent * | prepareSessionEvent (const ::google::protobuf::Message &sessionEvent) |
| Server_ProtocolHandler::Server_ProtocolHandler | ( | Server * | _server, |
| Server_DatabaseInterface * | _databaseInterface, | ||
| QObject * | parent = 0 ) |
| Server_ProtocolHandler::~Server_ProtocolHandler | ( | ) |
|
virtual |
Implements Server_AbstractUserInterface.
| void Server_ProtocolHandler::clearAuthNonce | ( | ) |
Invalidate the pending nonce (single-use).
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
inline |
|
inline |
|
pure virtual |
Implemented in AbstractServerSocketInterface, LocalServerInterface, TcpServerSocketInterface, and WebsocketServerSocketInterface.
|
pure virtual |
Implemented in LocalServerInterface, TcpServerSocketInterface, and WebsocketServerSocketInterface.
|
inline |
|
inlinevirtual |
Implements Server_AbstractUserInterface.
| bool Server_ProtocolHandler::isAuthNonceValid | ( | const QByteArray & | nonce, |
| const QString & | userName ) const |
True if nonce matches the pending one, was issued for userName, and is less than 60 seconds old.
|
inlineprotectedvirtual |
|
privateslot |
|
slot |
|
private |
|
virtual |
Reimplemented in AbstractServerSocketInterface.
|
private |
|
inlineprivatevirtual |
|
inlineprivatevirtual |
|
inlineprivatevirtual |
|
inlineprivatevirtual |
|
private |
|
private |
|
private |
|
private |
|
private |
|
virtual |
|
virtual |
Implements Server_AbstractUserInterface.
|
virtual |
|
virtual |
| void Server_ProtocolHandler::setAuthNonce | ( | const QByteArray & | nonce, |
| const QString & | userName ) |
Store a fresh challenge nonce bound to userName for the next challenge-response login attempt.
|
privatepure virtual |
Implemented in AbstractServerSocketInterface, and LocalServerInterface.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
private |
|
protected |
|
protected |
|
protected |
|
private |
|
private |
|
private |
|
private |
|
protected |
|
private |
|
protected |