Terminus
Public Member Functions | Protected Slots | List of all members
terminus::NetworkClient Class Reference

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

#include <networkclient.h>

Inheritance diagram for terminus::NetworkClient:
terminus::NetworkEndpoint

Public Member Functions

 NetworkClient (QObject *parent=0)
 
void connectClient (QString host, 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 onSocketConnected ()
 
void onSocketDisconnected ()
 
- Protected Slots inherited from terminus::NetworkEndpoint
void onDataReceived ()
 

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)
 
- Protected Attributes inherited from terminus::NetworkEndpoint
State m_state
 
QTcpSocket * m_socket
 

Detailed Description

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

See also
NetworkEndpoint

Constructor & Destructor Documentation

terminus::NetworkClient::NetworkClient ( QObject *  parent = 0)

Member Function Documentation

void terminus::NetworkClient::connectClient ( QString  host,
unsigned short  port 
)
void terminus::NetworkClient::onSocketConnected ( )
protectedslot
void terminus::NetworkClient::onSocketDisconnected ( )
protectedslot

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