|
trikRuntime
|
Utility class that can simulate TCP network activity according to protocols used by TrikRuntime. More...
#include <tcpClientSimulator.h>


Public Member Functions | |
| TcpClientSimulator (const QString &ip, int port) | |
| Constructor. More... | |
| QString | latestResponse () const |
| Returns latest received response from a server. More... | |
Public Member Functions inherited from trikNetwork::Connection | |
| Connection (Protocol connectionProtocol, Heartbeat useHeartbeat) | |
| Constructor. More... | |
| bool | isConnected () const |
| Returns true if socket is opened or false otherwise. More... | |
| bool | isValid () const |
| Checks if socket is valid or not Attention!!! Hot fix for NTI contest. More... | |
| QHostAddress | peerAddress () const |
| Returns peer address of a connection, if it is open, or empty QHostAddress if connection is not established yet. More... | |
| int | peerPort () const |
| Returns peer port of a connection, if it is open, or -1 if connection is not established yet. More... | |
| Q_INVOKABLE void | init (qintptr socketDescriptor) |
| Creates socket and initializes incoming connection, shall be called when Connection is already in its own thread. More... | |
| Q_INVOKABLE void | send (const QByteArray &data) |
| Sends given byte array to peer. More... | |
Additional Inherited Members | |
Signals inherited from trikNetwork::Connection | |
| void | disconnected (trikNetwork::Connection *self) |
| Emitted after connection becomes closed. More... | |
| void | connected (trikNetwork::Connection *self) |
| Emitted after connection is established. More... | |
Protected Member Functions inherited from trikNetwork::Connection | |
| void | init (const QHostAddress &ip, int port) |
| Creates socket and initializes outgoing connection, shall be called when Connection is already in its own thread. More... | |
Utility class that can simulate TCP network activity according to protocols used by TrikRuntime.
| TcpClientSimulator::TcpClientSimulator | ( | const QString & | ip, |
| int | port | ||
| ) |
Constructor.
| ip | - ip addres of a server to which we shall connect. |
| port | - port of a server to which we shall connect. |
| QString TcpClientSimulator::latestResponse | ( | ) | const |
Returns latest received response from a server.