Stellarium  0.17.0
Public Member Functions
ServerAuthHandler Class Reference

Server-side auth handler.

#include <SyncServerHandlers.hpp>

Public Member Functions

 ServerAuthHandler (SyncServer *server, bool allowDivergingAppVersions)
 
bool handleMessage (QDataStream &stream, SyncProtocol::tPayloadSize dataSize, SyncRemotePeer &peer) Q_DECL_OVERRIDE
 Read a message directly from the stream. More...
 
- Public Member Functions inherited from ServerHandler
 ServerHandler (SyncServer *server)
 

Additional Inherited Members

- Protected Attributes inherited from ServerHandler
SyncServerserver
 

Member Function Documentation

bool ServerAuthHandler::handleMessage ( QDataStream &  stream,
SyncProtocol::tPayloadSize  dataSize,
SyncRemotePeer peer 
)
virtual

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

Parameters
streamThe stream to be used to read data. The current position is after the header.
dataSizeThe data size from the message header
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.

Implements SyncMessageHandler.