macro_rules! new_socket_client { ($const_config: expr, $host: expr, $port: expr) => { ... }; }
Expand description
Instantiates & allocates resources for a stateless CompositeSocketClient (suitable for single protocol communications),
ready to be later started by start_unresponsive_client_processor!() or start_responsive_client_processor!().
Params:
const_config: [ConstConfig] – the configurations for the client, enforcing const/compile time optimizations;host: IntoString – the interface to listen to incoming connections;port: u16 – the port to listen to incoming connections;
Example:
let mut client = new_socket_client!(CONFIG, "google.com", 80);
See new_composite_socket_client!() if you want to use the “Composite Protocol Stacking” pattern.