74using websocketpp::lib::placeholders::_1;
75using websocketpp::lib::placeholders::_2;
76using websocketpp::lib::bind;
86 if (con->get_resource() ==
"/getCaseCount") {
87 std::cout <<
"Detected " << msg->get_payload() <<
" test cases."
91 c->
send(hdl, msg->get_payload(), msg->get_opcode());
99 std::string uri =
"ws://localhost:9001";
116 websocketpp::lib::error_code ec;
123 std::cout <<
"case count: " <<
case_count << std::endl;
128 std::stringstream
url;
130 url << uri <<
"/runCase?case=" << i <<
"&agent="
131 << websocketpp::user_agent;
140 std::cout <<
"done" << std::endl;
143 std::cout << e.
what() << std::endl;
Client endpoint role based on the given config.
connection_ptr connect(connection_ptr con)
Begin the connection process for the given connection.
connection_ptr get_connection(uri_ptr location, lib::error_code &ec)
Get a new connection.
connection_type::ptr connection_ptr
connection_ptr get_con_from_hdl(connection_hdl hdl, lib::error_code &ec)
Retrieves a connection_ptr from a connection_hdl (exception free)
void set_message_handler(message_handler h)
void clear_access_channels(log::level channels)
Clear Access logging channels.
void send(connection_hdl hdl, std::string const &payload, frame::opcode::value op, lib::error_code &ec)
Create a message and add it to the outgoing send queue (exception free)
void clear_error_channels(log::level channels)
Clear Error logging channels.
virtual char const * what() const
lib::shared_ptr< message > ptr
Basic ASIO endpoint socket component.
Asio based endpoint transport component.
websocketpp::config::asio_tls_client::message_type::ptr message_ptr
lib::weak_ptr< void > connection_hdl
A handle to uniquely identify a connection.
permessage_compress extension
type::alog_type alog_type
type::concurrency_type concurrency_type
type::elog_type elog_type
type::response_type response_type
websocketpp::transport::asio::basic_socket::endpoint socket_type
type::request_type request_type
base::concurrency_type concurrency_type
websocketpp::transport::asio::endpoint< transport_config > transport_type
base::elog_type elog_type
base::con_msg_manager_type con_msg_manager_type
base::endpoint_msg_manager_type endpoint_msg_manager_type
websocketpp::extensions::permessage_deflate::enabled< permessage_deflate_config > permessage_deflate_type
base::alog_type alog_type
base::request_type request_type
base::response_type response_type
base::message_type message_type
Client config with asio transport and TLS disabled.
static level const all
Special aggregate value representing "all levels".
static level const all
Special aggregate value representing "all levels".
void on_message(client *c, websocketpp::connection_hdl hdl, message_ptr msg)
websocketpp::client< deflate_config > client