Class Client¶
Defined in File client.hpp
Class Documentation¶
-
class Client¶
A RAII wrapper around network sockets providing a simple interface for sending and receiving data.
Public Functions¶
-
Client(const address_t &address, const socket_protocol protocol = socket_protocol::TCP, const address_t &bind_service = {}, const socket_config_handlers_t &config_handlers = {})¶
Initialise a client socket with the given address, protocol, and service/port.
- Parameters:¶
- const address_t &address¶
The address to connect to
- const socket_protocol protocol = socket_protocol::TCP¶
The protocol to use (TCP/UDP)
- const address_t &bind_service = {}¶
The service/port to bind to
- const socket_config_handlers_t &config_handlers = {}¶
Configuration handlers for various stages of socket creation
-
inline Client(const address_t &address, const socket_protocol protocol, const uint16_t bind_port, const socket_config_handlers_t &config_handlers = {})¶
-
Client(const address_t &address, const socket_protocol protocol = socket_protocol::TCP, const address_t &bind_service = {}, const socket_config_handlers_t &config_handlers = {})¶