KDEGames
kmessageclient.cpp
76 connect(connection, &KMessageIO::connectionBroken, this, &KMessageClient::removeBrokenConnection);
void processFirstMessage()
Called from unlock() (using QTimer::singleShot) until all delayed messages are delivered.
Definition kmessageclient.cpp:267
virtual void processMessage(const QByteArray &msg)
This slot is called from processIncomingMessage or processFirstMessage, depending on whether the clie...
Definition kmessageclient.cpp:180
void lock()
Once this function is called no message will be received anymore.
Definition kmessageclient.cpp:313
void eventClientConnected(quint32 clientID)
This signal is emitted when another client has connected to the server.
void sendBroadcast(const QByteArray &msg)
Sends a message to all the clients connected to the server, including ourself.
Definition kmessageclient.cpp:133
void broadcastReceived(const QByteArray &msg, quint32 senderID)
This signal is emitted when the client receives a broadcast message from the KMessageServer,...
void eventClientDisconnected(quint32 clientID, bool broken)
This signal is emitted when the server has lost the connection to one of the clients (This could be b...
virtual void processIncomingMessage(const QByteArray &msg)
This slot is called from the signal KMessageIO::received whenever a message from the KMessageServer a...
Definition kmessageclient.cpp:164
void disconnect()
Corresponds to setServer(0); but also emits the connectionBroken signal.
Definition kmessageclient.cpp:301
void connectionBroken()
This signal is emitted when the connection to the KMessageServer is broken.
void sendForward(const QByteArray &msg, const QList< quint32 > &clients)
Sends a message to all the clients in a list.
Definition kmessageclient.cpp:145
void serverMessageReceived(const QByteArray &msg, bool &unknown)
This signal is emitted on every message that came from the server.
void adminStatusChanged(bool isAdmin)
This signal is emitted when this client becomes the admin client or when it loses the admin client st...
unsigned int delayedMessageCount() const
Definition kmessageclient.cpp:326
void sendServerMessage(const QByteArray &msg)
Sends a message to the KMessageServer.
Definition kmessageclient.cpp:124
void setServer(const QString &host, quint16 port)
Connects the client to (another) server.
Definition kmessageclient.cpp:54
void unlock()
Deliver every message that was delayed by lock() and actually deliver all messages that get received ...
Definition kmessageclient.cpp:318
virtual void removeBrokenConnection()
This slot is called from the signal KMessageIO::connectionBroken.
Definition kmessageclient.cpp:281
void aboutToDisconnect(quint32 id)
This signal is emitted right before the client disconnects.
void forwardReceived(const QByteArray &msg, quint32 senderID, const QList< quint32 > &receivers)
This signal is emitted when the client receives a forward message from the KMessageServer,...
This class implements the message communication using function calls directly.
Definition kmessageio.h:279
This abstract base class represents one end of a message connections between two clients.
Definition kmessageio.h:44
void connectionBroken()
This signal is emitted when the connection is closed.
void received(const QByteArray &msg)
This signal is emitted when /e send() on the connected KMessageIO object is called.
A server for message sending and broadcasting, using TCP/IP connections.
Definition kmessageserver.h:167
void addClient(KMessageIO *)
Adds a new KMessageIO object to the communication server.
Definition kmessageserver.cpp:156
This class implements the message communication using a TCP/IP socket.
Definition kmessageio.h:150
virtual bool atEnd() const const override
virtual bool open(OpenMode flags) override
void setData(const QByteArray &data)
QByteArray readAll()
WriteOnly
Q_EMITQ_EMIT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
int receivers(const char *signal) const const
singleShot
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:04 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:04 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.