Stellarium
23.4
|
Handling the connection to a remote peer (i.e. all clients on the server, and the server on the client) More...
#include <SyncProtocol.hpp>
Signals | |
void | disconnected (bool cleanDisconnect) |
Public Member Functions | |
SyncRemotePeer (QAbstractSocket *socket, bool isServer, const QHash< SyncProtocol::SyncMessageType, SyncMessageHandler * > &handlerHash) | |
void | writeMessage (const SyncProtocol::SyncMessage &msg) |
Sends a message to this peer. | |
void | writeData (const QByteArray &data, qint64 size=-1) |
Writes this data packet to the socket without processing. | |
void | writeError (const QString &err) |
Can be used to write an error message to the peer and drop the connection. | |
void | peerLog (const QtMsgType type, const QString &msg) const |
Log a message for this peer via qCDebug or the respective other messages type={QtDebugMsg|QtInfoMsg|QtWarningMsg|QtCriticalMsg|QtFatalMsg} If in doubt, use QtDebugMsg. | |
bool | isAuthenticated () const |
QUuid | getID () const |
void | checkTimeout () |
void | disconnectPeer () |
QString | getError () const |
Friends | |
class | ServerAuthHandler |
class | ClientAuthHandler |
Handling the connection to a remote peer (i.e. all clients on the server, and the server on the client)