20 #ifndef SYNCSERVER_HPP_ 21 #define SYNCSERVER_HPP_ 23 #include "SyncProtocol.hpp" 25 #include <QAbstractSocket> 27 #include <QLoggingCategory> 33 Q_DECLARE_LOGGING_CATEGORY(syncServer)
56 QString errorString()
const;
62 void timerEvent(QTimerEvent* evt) Q_DECL_OVERRIDE;
64 void handleNewConnection();
65 void connectionError(QAbstractSocket::SocketError err);
68 void clientDisconnected(
bool clean);
73 void checkStopState();
77 QVector<SyncMessageHandler*> handlerList;
78 QVector<SyncServerEventSender*> senderList;
83 typedef QVector<SyncRemotePeer*> tClientList;
86 QByteArray broadcastBuffer;
Base interface for the messages themselves, allowing to serialize/deserialize them.
Server-side auth handler.
Handling the connection to a remote peer (i.e. all clients on the server, and the server on the clien...
Subclasses of this class notify clients of state changes.
virtual void update()
This is guaranteed to be called once per frame (usually after all other StelModules have been updated...
void broadcastMessage(const SyncProtocol::SyncMessage &msg)
Subclasses can call this to broadcast a message to all valid connected clients.
Implements a server to which SyncClients can connect and receive state changes.