The NetworkEndpoint class provides a common interface that NetworkServer and NetworkClient implement.
More...
#include <networkendpoint.h>
The NetworkEndpoint class provides a common interface that NetworkServer and NetworkClient implement.
It manages an underlying TcpSocket and implements logic to serialize and deserialize AbstractCommands
- See also
- NetworkServer, NetworkClient, AbstractCommand
Enumerator |
---|
Listening |
|
Connected |
|
Disconnected |
|
terminus::NetworkEndpoint::NetworkEndpoint |
( |
QObject * |
parent = 0 | ) |
|
terminus::NetworkEndpoint::~NetworkEndpoint |
( |
| ) |
|
|
virtual |
AbstractCommand * terminus::NetworkEndpoint::deserializeCommand |
( |
const QString & |
message | ) |
|
|
protected |
void terminus::NetworkEndpoint::disconnect |
( |
| ) |
|
disconnect the underlying socket
void terminus::NetworkEndpoint::onDataReceived |
( |
| ) |
|
|
protectedslot |
void terminus::NetworkEndpoint::receivedCommand |
( |
AbstractCommand * |
command | ) |
|
|
signal |
serializes command and sends it to the opposite NetworkEndpoint
- Parameters
-
command | - ownership is not taken |
void terminus::NetworkEndpoint::sendMessage |
( |
const QString & |
message | ) |
|
|
protected |
QString terminus::NetworkEndpoint::serializeCommand |
( |
AbstractCommand * |
command | ) |
|
|
protected |
void terminus::NetworkEndpoint::setSocket |
( |
QTcpSocket * |
socket | ) |
|
|
protected |
QTcpSocket * terminus::NetworkEndpoint::socket |
( |
| ) |
|
|
protected |
void terminus::NetworkEndpoint::stateChanged |
( |
State |
newState | ) |
|
|
signal |
QTcpSocket* terminus::NetworkEndpoint::m_socket |
|
protected |
State terminus::NetworkEndpoint::m_state |
|
protected |
The documentation for this class was generated from the following files: