Public Member Functions | Protected Slots | Protected Attributes | List of all members
terminus::NetworkServer Class Reference

The NetworkServer implements the NetworkEndpoint interface as the server role of a TCP connection. More...

#include <networkserver.h>

Inheritance diagram for terminus::NetworkServer:

Public Member Functions

 NetworkServer (QObject *parent=0)
virtual ~NetworkServer ()
bool listen (unsigned short port)
- Public Member Functions inherited from terminus::NetworkEndpoint
 NetworkEndpoint (QObject *parent=0)
virtual ~NetworkEndpoint ()
void sendCommand (AbstractCommand *command)
 serializes command and sends it to the opposite NetworkEndpoint More...
void disconnect ()
 disconnect the underlying socket More...
State state ()

Protected Slots

void onClientConnected ()
void onClientDisconnected ()
- Protected Slots inherited from terminus::NetworkEndpoint
void onDataReceived ()

Protected Attributes

QTcpServer * m_server
- Protected Attributes inherited from terminus::NetworkEndpoint
State m_state
QTcpSocket * m_socket

Additional Inherited Members

- Public Types inherited from terminus::NetworkEndpoint
enum  State { State::Listening, State::Connected, State::Disconnected }
- Signals inherited from terminus::NetworkEndpoint
void receivedCommand (AbstractCommand *command)
 fired for every AbstractCommand received from the opposite NetworkEndpoint More...
void stateChanged (State newState)
 fired after state of this NetworkEndpoint is changed More...
- Protected Member Functions inherited from terminus::NetworkEndpoint
QTcpSocket * socket ()
void setSocket (QTcpSocket *socket)
void enterState (State state)
QString serializeCommand (AbstractCommand *command)
AbstractCommanddeserializeCommand (const QString &message)
void sendMessage (const QString &message)

Detailed Description

The NetworkServer implements the NetworkEndpoint interface as the server role of a TCP connection.

See also

Constructor & Destructor Documentation

terminus::NetworkServer::NetworkServer ( QObject *  parent = 0)
terminus::NetworkServer::~NetworkServer ( )

Member Function Documentation

bool terminus::NetworkServer::listen ( unsigned short  port)
void terminus::NetworkServer::onClientConnected ( )
void terminus::NetworkServer::onClientDisconnected ( )

Member Data Documentation

QTcpServer* terminus::NetworkServer::m_server

The documentation for this class was generated from the following files: