2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
31#include <websocketpp/config/asio_no_tls_client.hpp>
32#include <websocketpp/client.hpp>
34#include <websocketpp/common/thread.hpp>
35#include <websocketpp/common/memory.hpp>
44 websocket_endpoint () {
45 m_endpoint.clear_access_channels(websocketpp::log::alevel::all);
46 m_endpoint.clear_error_channels(websocketpp::log::elevel::all);
48 m_endpoint.init_asio();
49 m_endpoint.start_perpetual();
51 m_thread = websocketpp::lib::make_shared<websocketpp::lib::thread>(&client::run, &m_endpoint);
64 std::cout <<
"Enter Command: ";
65 std::getline(std::cin, input);
67 if (input ==
"quit") {
69 }
else if (input ==
"help") {
71 <<
"\nCommand List:\n"
72 <<
"help: Display this help text\n"
73 <<
"quit: Exit the program\n"
76 std::cout <<
"Unrecognized Command" << std::endl;
Client endpoint role based on the given config.
Namespace for the WebSocket++ project.
Client config with asio transport and TLS disabled.