Stellarium 0.15.2
List of all members | Public Member Functions
SyncMessageHandler Class Referenceabstract

Base interface for message handlers, i.e. reacting to messages. More...

#include <SyncProtocol.hpp>

+ Inheritance diagram for SyncMessageHandler:

Public Member Functions

virtual bool handleMessage (QDataStream &stream, SyncRemotePeer &peer)=0
 Read a message directly from the stream. More...
 

Detailed Description

Base interface for message handlers, i.e. reacting to messages.

Definition at line 177 of file SyncProtocol.hpp.

Member Function Documentation

virtual bool SyncMessageHandler::handleMessage ( QDataStream &  stream,
SyncRemotePeer peer 
)
pure virtual

Read a message directly from the stream.

SyncMessage::deserialize of the correct class should be used to deserialize the message.

Parameters
peerThe remote peer this message originated from. Can be used to send replies through SyncRemotePeer::writeMessage
Returns
return false if the message is found to be invalid. The connection to the client/server will be dropped.

Implemented in ClientSelectionHandler, ClientLocationHandler, ClientTimeHandler, ClientAliveHandler, ServerAliveHandler, ClientAuthHandler, ServerAuthHandler, ClientErrorHandler, and ServerErrorHandler.


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