10 class AbstractCommand;
The NetworkEndpoint class provides a common interface that NetworkServer and NetworkClient implement...
Definition: networkendpoint.h:19
void disconnect()
disconnect the underlying socket
Definition: networkendpoint.cpp:42
void setSocket(QTcpSocket *socket)
Definition: networkendpoint.cpp:60
QTcpSocket * socket()
Definition: networkendpoint.cpp:55
void sendCommand(AbstractCommand *command)
serializes command and sends it to the opposite NetworkEndpoint
Definition: networkendpoint.cpp:37
State
Definition: networkendpoint.h:23
void enterState(State state)
Definition: networkendpoint.cpp:65
virtual ~NetworkEndpoint()
Definition: networkendpoint.cpp:32
AbstractCommand * deserializeCommand(const QString &message)
Definition: networkendpoint.cpp:84
State state()
Definition: networkendpoint.cpp:50
NetworkEndpoint(QObject *parent=0)
Definition: networkendpoint.cpp:25
void onDataReceived()
Definition: networkendpoint.cpp:143
void sendMessage(const QString &message)
Definition: networkendpoint.cpp:122
QString serializeCommand(AbstractCommand *command)
Definition: networkendpoint.cpp:71
QTcpSocket * m_socket
Definition: networkendpoint.h:79
Definition: eventhandler.cpp:18
State m_state
Definition: networkendpoint.h:78
void receivedCommand(AbstractCommand *command)
fired for every AbstractCommand received from the opposite NetworkEndpoint
The AbstractCommand class defines the interface that every command has to implement.
Definition: abstractcommand.h:23
void stateChanged(State newState)
fired after state of this NetworkEndpoint is changed