#include <TcpClient.h>
◆ TcpClient() [1/2]
| conscience_core::communication::TcpClient::TcpClient |
( |
const string & |
ipAddress, |
|
|
unsigned int |
port |
|
) |
| |
Connects TCP client and throws error if failure
◆ TcpClient() [2/2]
| conscience_core::communication::TcpClient::TcpClient |
( |
const ExistingSocket & |
existingSocket, |
|
|
bool |
releaseAsioContext = false |
|
) |
| |
Creates a wrapping TcpClient over an existing socket (for instance when server accepts a remote connection, a TcpClient will be created on resulting socket to send and receive data)
- Parameters
-
| releaseAsioContext | if true, tcp client, on destroy, will stop and delete asioContext |
◆ ~TcpClient()
| conscience_core::communication::TcpClient::~TcpClient |
( |
| ) |
|
◆ cancelCloseAfterTimeout()
| void conscience_core::communication::TcpClient::cancelCloseAfterTimeout |
( |
| ) |
|
◆ getIpAddress()
| string conscience_core::communication::TcpClient::getIpAddress |
( |
| ) |
const |
◆ getPort()
| unsigned int conscience_core::communication::TcpClient::getPort |
( |
| ) |
const |
◆ getTimeout()
| optional< unsigned int > conscience_core::communication::TcpClient::getTimeout |
( |
| ) |
const |
- Returns
- timeout in seconds, if any
◆ isReleased()
| bool conscience_core::communication::TcpClient::isReleased |
( |
| ) |
const |
◆ receive()
| optional< vector< unsigned char > * > conscience_core::communication::TcpClient::receive |
( |
| ) |
|
◆ release()
| void conscience_core::communication::TcpClient::release |
( |
| ) |
|
◆ scheduleCloseAfterTimeout()
| void conscience_core::communication::TcpClient::scheduleCloseAfterTimeout |
( |
| ) |
|
◆ send()
| optional< vector< unsigned char > * > conscience_core::communication::TcpClient::send |
( |
const vector< unsigned char > * |
bytes, |
|
|
bool |
noResponse = false, |
|
|
bool |
close = false |
|
) |
| |
- Parameters
-
| bytes | will be deleted in this method |
◆ setTimeout()
| void conscience_core::communication::TcpClient::setTimeout |
( |
unsigned |
timeoutSeconds | ) |
|
throws error if failure
- Parameters
-
The documentation for this class was generated from the following files: