Stellarium  0.90.0
List of all members | Public Slots | Signals | Public Member Functions | Protected Member Functions | Friends
SyncServer Class Reference

Implements a server to which SyncClients can connect and receive state changes. More...

#include <SyncServer.hpp>

+ Inheritance diagram for SyncServer:
+ Collaboration diagram for SyncServer:

Public Slots

bool start (int port)
 Starts the SyncServer on the specified port. More...
 
void stop ()
 Disconnects all clients, and stops listening. More...
 
QString errorString () const
 Returns a string of the last server error. More...
 

Signals

void serverStopped ()
 Emitted when the server is completely stopped, and all clients have disconnected. More...
 

Public Member Functions

 SyncServer (QObject *parent=Q_NULLPTR)
 
void update ()
 This should be called in the StelModule::update function. More...
 
void broadcastMessage (const SyncProtocol::SyncMessage &msg)
 Broadcasts this message to all connected and authenticated clients. More...
 

Protected Member Functions

void timerEvent (QTimerEvent *evt) Q_DECL_OVERRIDE
 

Friends

class ServerAuthHandler
 

Detailed Description

Implements a server to which SyncClients can connect and receive state changes.

Definition at line 36 of file SyncServer.hpp.

Member Function Documentation

void SyncServer::broadcastMessage ( const SyncProtocol::SyncMessage msg)

Broadcasts this message to all connected and authenticated clients.

QString SyncServer::errorString ( ) const
slot

Returns a string of the last server error.

void SyncServer::serverStopped ( )
signal

Emitted when the server is completely stopped, and all clients have disconnected.

bool SyncServer::start ( int  port)
slot

Starts the SyncServer on the specified port.

If the server is already running, stops it first. Returns true if successful (false usually means port was in use, use getErrorString)

void SyncServer::stop ( )
slot

Disconnects all clients, and stops listening.

void SyncServer::update ( )

This should be called in the StelModule::update function.


The documentation for this class was generated from the following file: