20 #ifndef SYNCSERVEREVENTSENDERS_HPP_ 21 #define SYNCSERVEREVENTSENDERS_HPP_ 23 #include "SyncProtocol.hpp" 24 #include "SyncMessages.hpp" 74 virtual T constructMessage() = 0;
81 virtual void update() Q_DECL_OVERRIDE;
108 Time constructMessage() Q_DECL_OVERRIDE;
117 Location constructMessage() Q_DECL_OVERRIDE;
126 Selection constructMessage() Q_DECL_OVERRIDE;
virtual void update() Q_DECL_OVERRIDE
If isDirty is true, broadcasts a message to all using constructMessage() and broadcastMessage, and resets isDirty.
This class provides a semi-automatic event sender using a specific message type.
virtual void newClientConnected(SyncRemotePeer &client) Q_DECL_OVERRIDE
Uses constructMessage() to send a message to the new client.
Handling the connection to a remote peer (i.e. all clients on the server, and the server on the clien...
void writeMessage(const SyncMessage &msg)
Sends a message to this peer.
Main class for Stellarium core processing.
bool isDirty
Free to use by sublasses. Recommendation: use to track if update() should broadcast a message...
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...
virtual void reactToStellariumEvent()
This may be used to react to Stellarium application events and queue a broadcast or store the changed...
StelCore * core
Direct access to StelCore.
virtual void newClientConnected(SyncRemotePeer &client)
This is automatically called by the SyncServer whenever a new client connects.
void broadcastMessage(const SyncMessage &msg)
Subclasses can call this to broadcast a message to all valid connected clients.
Base interface for the messages themselves, allowing to serialize/deserialize them.
Manage the selection and queries on one or more StelObjects.
Notifies clients of simulation time jumps and time scale changes.
Implements a server to which SyncClients can connect and receive state changes.