Abstract application client.
More...
#include <StormByte/network/client.hxx>
Abstract application client.
Derive and implement InputPipeline() / OutputPipeline(). Use protected Send() for request/response.
- Note
- Inheritance-oriented. Not for direct generic use without a subclass.
◆ Client() [1/3]
| StormByte::Network::Client::Client |
( |
const DeserializePacketFunction & |
deserialize_packet_function, |
|
|
std::shared_ptr< Logger::Log > |
logger |
|
) |
| |
|
inlinenoexcept |
Construct with a packet factory and a logger.
- Parameters
-
| deserialize_packet_function | Builds domain packets from wire data. |
| logger | Diagnostic logger. |
◆ Client() [2/3]
| StormByte::Network::Client::Client |
( |
const Client & |
other | ) |
|
|
delete |
Copy constructor (deleted).
◆ Client() [3/3]
| StormByte::Network::Client::Client |
( |
Client && |
other | ) |
|
|
defaultnoexcept |
◆ ~Client()
| virtual StormByte::Network::Client::~Client |
( |
| ) |
|
|
virtualnoexcept |
Destructor (out-of-line in .cxx).
◆ Connect()
| bool StormByte::Network::Client::Connect |
( |
const Connection::Protocol & |
protocol, |
|
|
const std::string & |
address, |
|
|
const unsigned short & |
port |
|
) |
| |
|
overridevirtual |
Connect to a remote host.
- Parameters
-
| protocol | Address family. |
| address | Hostname or IP. |
| port | Port number. |
- Returns
- true on success.
Implements StormByte::Network::Endpoint.
◆ Disconnect()
| void StormByte::Network::Client::Disconnect |
( |
| ) |
|
|
overridevirtualnoexcept |
◆ operator=() [1/2]
| Client & StormByte::Network::Client::operator= |
( |
Client && |
other | ) |
|
|
defaultnoexcept |
◆ operator=() [2/2]
| Client & StormByte::Network::Client::operator= |
( |
const Client & |
other | ) |
|
|
delete |
Copy assignment (deleted).
◆ Send()
Send packet and return the response (or nullptr).
- Parameters
-
- Returns
- Response, or nullptr on error.
◆ Status()
The documentation for this class was generated from the following file: