Stellarium
0.17.0
|
Subclasses of this class notify clients of state changes.
#include <SyncServerEventSenders.hpp>
Protected Slots | |
virtual void | reactToStellariumEvent () |
This may be used to react to Stellarium application events and queue a broadcast or store the changed state. More... | |
virtual void | newClientConnected (SyncRemotePeer &client) |
This is automatically called by the SyncServer whenever a new client connects. More... | |
Protected Member Functions | |
virtual void | update () |
This is guaranteed to be called once per frame (usually after all other StelModules have been updated). More... | |
void | broadcastMessage (const SyncProtocol::SyncMessage &msg) |
Subclasses can call this to broadcast a message to all valid connected clients. | |
Protected Attributes | |
bool | isDirty |
Free to use by sublasses. Recommendation: use to track if update() should broadcast a message. | |
StelCore * | core |
Direct access to StelCore. | |
Friends | |
class | SyncServer |
|
inlineprotectedvirtualslot |
Use this to set clients to the current server state. The default implementation does nothing.
Reimplemented in TypedSyncServerEventSender< T >, TypedSyncServerEventSender< SyncProtocol::Fov >, TypedSyncServerEventSender< SyncProtocol::Location >, TypedSyncServerEventSender< SyncProtocol::View >, TypedSyncServerEventSender< SyncProtocol::Time >, and TypedSyncServerEventSender< SyncProtocol::Selection >.
|
inlineprotectedvirtualslot |
The general idea is to connect this to various signals in the constructor. It is not necessary to use this, but recommended for clarity. The default implementation sets isDirty to true.
|
inlineprotectedvirtual |
It is can be used to defer state broadcasts until the frame is finished to only send a single message. Default implentation does nothing.
Reimplemented in FovEventSender, ViewEventSender, TypedSyncServerEventSender< T >, TypedSyncServerEventSender< SyncProtocol::Fov >, TypedSyncServerEventSender< SyncProtocol::Location >, TypedSyncServerEventSender< SyncProtocol::View >, TypedSyncServerEventSender< SyncProtocol::Time >, and TypedSyncServerEventSender< SyncProtocol::Selection >.