Websocket Client
Example
1auto client = std::make_shared<WebsocketClient>(
2 WebsocketClient::ConstructionArguments{.executor = server_->getExecutor(), .sslContext = std::nullopt});
3client
4 ->connect({
5 .host = "localhost",
6 .port = std::to_string(server_->getLocalEndpoint().port()),
7 .path = "/",
8 })
9 .then([client]() {
10 client->binary(false);
11 client->send("Hello You!").then([](std::size_t){
12 // sent.
13 });
14 })
15 .fail([](auto) {
16 // Could not connect.
17 });