Stellarium 0.15.2
List of all members | Public Slots | 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...
 

Public Member Functions

 SyncServer (QObject *parent=0)
 
void update ()
 This should be called in the StelModule::update function. More...
 
void broadcastMessage (const 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 33 of file SyncServer.hpp.

Member Function Documentation

void SyncServer::broadcastMessage ( const SyncMessage msg)

Broadcasts this message to all connected and authenticated clients.

QString SyncServer::errorString ( ) const
slot

Returns a string of the last server error.

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: