Stellarium  HEAD
Protected Member Functions
ViewEventSender Class Reference

Protected Member Functions

SyncProtocol::View constructMessage () override
 This has to be used to construct a message using current app state. More...
 
void update () override
 This is guaranteed to be called once per frame (usually after all other StelModules have been updated). More...
 
- Protected Member Functions inherited from TypedSyncServerEventSender< SyncProtocol::View >
void newClientConnected (SyncRemotePeer &client) override
 Uses constructMessage() to send a message to the new client.
 
void update () override
 If isDirty is true, broadcasts a message to all using constructMessage() and broadcastMessage, and resets isDirty.
 
- Protected Member Functions inherited from SyncServerEventSender
void broadcastMessage (const SyncProtocol::SyncMessage &msg)
 Subclasses can call this to broadcast a message to all valid connected clients.
 

Additional Inherited Members

- Protected Slots inherited from SyncServerEventSender
virtual void reactToStellariumEvent ()
 This may be used to react to Stellarium application events and queue a broadcast or store the changed state. More...
 
- Protected Attributes inherited from SyncServerEventSender
bool isDirty
 Free to use by subclasses. Recommendation: use to track if update() should broadcast a message.
 
StelCorecore
 Direct access to StelCore.
 

Member Function Documentation

◆ constructMessage()

SyncProtocol::View ViewEventSender::constructMessage ( )
overrideprotectedvirtual

This has to be used to construct a message using current app state.

The default implementation constructs an error message.

Implements TypedSyncServerEventSender< SyncProtocol::View >.

◆ update()

void ViewEventSender::update ( )
overrideprotectedvirtual

This is guaranteed to be called once per frame (usually after all other StelModules have been updated).

It is can be used to defer state broadcasts until the frame is finished to only send a single message. Default implementation does nothing.

Reimplemented from SyncServerEventSender.