libkdegames/libkdegamesprivate/kgame
kmessageclient.cpp
Go to the documentation of this file.
206 { // must NOT happen, since we check in processIncomingMessage as well as in processFirstMessage
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:183
Definition: kmessageserver.h:185
unsigned int delayedMessageCount() const
Definition: kmessageclient.cpp:370
Definition: kmessageserver.h:201
This class implements the message communication using a TCP/IP socket.
Definition: kmessageio.h:170
void sendForward(const QByteArray &msg, const QList< quint32 > &clients)
Sends a message to all the clients in a list.
Definition: kmessageclient.cpp:163
void sendServerMessage(const QByteArray &msg)
Sends a message to the KMessageServer.
Definition: kmessageclient.cpp:141
void aboutToDisconnect(quint32 id)
This signal is emitted right before the client disconnects.
void setData(const QByteArray &data)
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, sent by another client.
void serverMessageReceived(const QByteArray &msg, bool &unknown)
This signal is emitted on every message that came from the server.
This class implements the message communication using function calls directly.
Definition: kmessageio.h:294
void addClient(KMessageIO *)
Adds a new KMessageIO object to the communication server.
Definition: kmessageserver.cpp:180
virtual bool atEnd() const
virtual void removeBrokenConnection()
This slot is called from the signal KMessageIO::connectionBroken.
Definition: kmessageclient.cpp:323
void processFirstMessage()
Called from unlock() (using QTimer::singleShot) until all delayed messages are delivered.
Definition: kmessageclient.cpp:307
Definition: kmessageserver.h:199
void adminStatusChanged(bool isAdmin)
This signal is emitted when this client becomes the admin client or when it loses the admin client st...
void disconnect()
Corresponds to setServer(0); but also emits the connectionBroken signal.
Definition: kmessageclient.cpp:344
void removeBrokenConnection2()
Definition: kmessageclient.cpp:332
void sendBroadcast(const QByteArray &msg)
Sends a message to all the clients connected to the server, including ourself.
Definition: kmessageclient.cpp:151
This abstract base class represents one end of a message connections between two clients.
Definition: kmessageio.h:57
QByteArray readAll()
A server for message sending and broadcasting, using TCP/IP connections.
Definition: kmessageserver.h:175
virtual bool open(QFlags< QIODevice::OpenModeFlag > flags)
void eventClientConnected(quint32 clientID)
This signal is emitted when another client has connected to the server.
void broadcastReceived(const QByteArray &msg, quint32 senderID)
This signal is emitted when the client receives a broadcast message from the KMessageServer, sent by another client.
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...
void lock()
Once this function is called no message will be received anymore.
Definition: kmessageclient.cpp:356
virtual void processMessage(const QByteArray &msg)
This slot is called from processIncomingMessage or processFirstMessage, depending on whether the clie...
Definition: kmessageclient.cpp:203
void connectionBroken()
This signal is emitted when the connection to the KMessageServer is broken.
void unlock()
Deliver every message that was delayed by lock() and actually deliver all messages that get received ...
Definition: kmessageclient.cpp:361
QString fromLatin1(const char *str, int size)
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void setServer(const QString &host, quint16 port)
Connects the client to (another) server.
Definition: kmessageclient.cpp:67
int receivers(const char *signal) const
singleShot
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:54 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:54 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.