Stellarium 0.15.2
|
Contains sync protocol data definitions shared between client and server. More...
Classes | |
struct | SyncHeader |
All messages are preceded by this. More... | |
Typedefs | |
typedef quint16 | tPayloadSize |
Enumerations | |
enum | SyncMessageType { ERROR, SERVER_CHALLENGE, CLIENT_CHALLENGE_RESPONSE, SERVER_CHALLENGERESPONSEVALID, TIME, LOCATION, SELECTION, ALIVE, MSGTYPE_MAX = ALIVE, MSGTYPE_SIZE = MSGTYPE_MAX+1 } |
Contains the possible message types. More... | |
Functions | |
QDataStream & | operator<< (QDataStream &out, const SyncHeader &header) |
Write a SyncHeader to a DataStream. More... | |
QDataStream & | operator>> (QDataStream &in, SyncHeader &header) |
Read a SyncHeader from a DataStream. More... | |
QDebug & | operator<< (QDebug &deb, SyncMessageType msg) |
Variables | |
const quint8 | SYNC_PROTOCOL_VERSION = 1 |
Should be changed with every breaking change. More... | |
const QDataStream::Version | SYNC_DATASTREAM_VERSION = QDataStream::Qt_5_0 |
const QByteArray | SYNC_MAGIC_VALUE = "StellariumSyncPluginProtocol" |
Magic value for protocol used during connection. Should NEVER change. More... | |
const qint64 | SYNC_HEADER_SIZE = sizeof(quint8) + sizeof(tPayloadSize) |
const qint64 | SYNC_MAX_PAYLOAD_SIZE = (2<<15) - 1 |
const qint64 | SYNC_MAX_MESSAGE_SIZE = SYNC_HEADER_SIZE + SYNC_MAX_PAYLOAD_SIZE |
Contains sync protocol data definitions shared between client and server.
Contains the possible message types.
The enum value is used as an ID to identify the message type over the network. The classes handling these messages are defined in SyncMessages.hpp
Definition at line 61 of file SyncProtocol.hpp.
QDataStream& SyncProtocol::operator<< | ( | QDataStream & | out, |
const SyncHeader & | header | ||
) |
Write a SyncHeader to a DataStream.
QDataStream& SyncProtocol::operator>> | ( | QDataStream & | in, |
SyncHeader & | header | ||
) |
Read a SyncHeader from a DataStream.
const QByteArray SyncProtocol::SYNC_MAGIC_VALUE = "StellariumSyncPluginProtocol" |
Magic value for protocol used during connection. Should NEVER change.
Definition at line 38 of file SyncProtocol.hpp.
const quint8 SyncProtocol::SYNC_PROTOCOL_VERSION = 1 |
Should be changed with every breaking change.
Definition at line 35 of file SyncProtocol.hpp.