Cockatrice 2025-11-30-Development-2.11.0-beta.38
A cross-platform virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
WebsocketServerSocketInterface Class Reference

#include <serversocketinterface.h>

Inheritance diagram for WebsocketServerSocketInterface:
[legend]
Collaboration diagram for WebsocketServerSocketInterface:
[legend]

Public Slots

void initConnection (void *_socket)
Public Slots inherited from Server_ProtocolHandler
void prepareDestroy ()

Public Member Functions

 WebsocketServerSocketInterface (Servatrice *_server, Servatrice_DatabaseInterface *_databaseInterface, QObject *parent=nullptr)
 ~WebsocketServerSocketInterface ()
QHostAddress getPeerAddress () const
QString getAddress () const
QString getConnectionType () const
Public Member Functions inherited from AbstractServerSocketInterface
 AbstractServerSocketInterface (Servatrice *_server, Servatrice_DatabaseInterface *_databaseInterface, QObject *parent=0)
 ~AbstractServerSocketInterface ()
bool initSession ()
void transmitProtocolItem (const ServerMessage &item)
Public Member Functions inherited from Server_ProtocolHandler
 Server_ProtocolHandler (Server *_server, Server_DatabaseInterface *_databaseInterface, QObject *parent=0)
 ~Server_ProtocolHandler ()
bool getAcceptsUserListChanges () const
bool getAcceptsRoomListChanges () const
Server_DatabaseInterfacegetDatabaseInterface () const
int getLastCommandTime () const
bool addSaidMessageSize (int size)
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)
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_Containeroperator= (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 Slots

void binaryMessageReceived (const QByteArray &message)
void flushOutputQueue ()
Protected Slots inherited from AbstractServerSocketInterface
void catchSocketError (QAbstractSocket::SocketError socketError)
void catchSocketDisconnected ()
virtual void flushOutputQueue ()=0

Protected Member Functions

void writeToSocket (QByteArray &data)
void flushSocket ()
bool initWebsocketSession ()
Protected Member Functions inherited from AbstractServerSocketInterface
void logDebugMessage (const QString &message)
bool tooManyRegistrationAttempts (const QString &ipAddress)

Private Attributes

QWebSocket * socket
QHostAddress address

Additional Inherited Members

Signals inherited from AbstractServerSocketInterface
void outputQueueChanged ()
void incTxBytes (qint64 amount)
Static Public Member Functions inherited from Server_AbstractUserInterface
static SessionEvent * prepareSessionEvent (const ::google::protobuf::Message &sessionEvent)
Protected Attributes inherited from AbstractServerSocketInterface
Servatriceservatrice
QList< ServerMessage > outputQueue
QMutex outputQueueMutex
Protected Attributes inherited from Server_ProtocolHandler
QMap< int, Server_Room * > rooms
bool deleted
Server_DatabaseInterfacedatabaseInterface
AuthenticationResult authState
bool usingRealPassword
bool acceptsUserListChanges
bool acceptsRoomListChanges
bool idleClientWarningSent
Protected Attributes inherited from Server_AbstractUserInterface
Serverserver
Protected Attributes inherited from ServerInfo_User_Container
ServerInfo_User * userInfo

Constructor & Destructor Documentation

◆ WebsocketServerSocketInterface()

WebsocketServerSocketInterface::WebsocketServerSocketInterface ( Servatrice * _server,
Servatrice_DatabaseInterface * _databaseInterface,
QObject * parent = nullptr )
Here is the call graph for this function:

◆ ~WebsocketServerSocketInterface()

WebsocketServerSocketInterface::~WebsocketServerSocketInterface ( )
Here is the call graph for this function:

Member Function Documentation

◆ binaryMessageReceived

void WebsocketServerSocketInterface::binaryMessageReceived ( const QByteArray & message)
protectedslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ flushOutputQueue

void WebsocketServerSocketInterface::flushOutputQueue ( )
protectedslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ flushSocket()

void WebsocketServerSocketInterface::flushSocket ( )
inlineprotectedvirtual

Implements AbstractServerSocketInterface.

Here is the caller graph for this function:

◆ getAddress()

QString WebsocketServerSocketInterface::getAddress ( ) const
inlinevirtual

Implements AbstractServerSocketInterface.

Here is the caller graph for this function:

◆ getConnectionType()

QString WebsocketServerSocketInterface::getConnectionType ( ) const
inlinevirtual

◆ getPeerAddress()

QHostAddress WebsocketServerSocketInterface::getPeerAddress ( ) const
inlinevirtual

◆ initConnection

void WebsocketServerSocketInterface::initConnection ( void * _socket)
slot
Here is the call graph for this function:

◆ initWebsocketSession()

bool WebsocketServerSocketInterface::initWebsocketSession ( )
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeToSocket()

void WebsocketServerSocketInterface::writeToSocket ( QByteArray & data)
inlineprotectedvirtual

Implements AbstractServerSocketInterface.

Here is the caller graph for this function:

Member Data Documentation

◆ address

QHostAddress WebsocketServerSocketInterface::address
private

◆ socket

QWebSocket* WebsocketServerSocketInterface::socket
private

The documentation for this class was generated from the following files: