74 using websocketpp::lib::placeholders::_1;
75 using websocketpp::lib::placeholders::_2;
76 using 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());
95 int main(
int argc,
char* argv[]) {
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=" 140 std::cout <<
"done" << std::endl;
143 std::cout << e.
what() << std::endl;
static level const all
Special aggregate value representing "all levels".
connection_type::ptr connection_ptr
Type of a shared pointer to the connections this server will create.
Asio based endpoint transport component.
websocketpp::config::asio_tls_client::message_type::ptr message_ptr
permessage_compress extension
type::request_type request_type
base::response_type response_type
Client endpoint role based on the given config.
stub_config::con_msg_manager_type con_msg_manager_type
lib::weak_ptr< void > connection_hdl
A handle to uniquely identify a connection.
static char const user_agent[]
Default user agent string.
connection_ptr get_con_from_hdl(connection_hdl hdl, lib::error_code &ec)
Retrieves a connection_ptr from a connection_hdl (exception free)
type::response_type response_type
This example is presently used as a scratch space.
connection_ptr connect(connection_ptr con)
Begin the connection process for the given connection.
base::message_type message_type
lib::shared_ptr< message > ptr
base::request_type request_type
websocketpp::config::asio_client::message_type::ptr message_ptr
websocketpp::transport::asio::endpoint< transport_config > transport_type
websocketpp::extensions::permessage_deflate::enabled< permessage_deflate_config > permessage_deflate_type
type::elog_type elog_type
void clear_error_channels(log::level channels)
Clear Error logging channels.
int main(int argc, char *argv[])
base::elog_type elog_type
type::concurrency_type concurrency_type
Basic ASIO endpoint socket component.
base::alog_type alog_type
websocketpp::transport::asio::basic_socket::endpoint socket_type
void clear_access_channels(log::level channels)
Clear Access logging channels.
base::endpoint_msg_manager_type endpoint_msg_manager_type
base::concurrency_type concurrency_type
void on_message(client *c, websocketpp::connection_hdl hdl, message_ptr msg)
websocketpp::client< deflate_config > client
base::con_msg_manager_type con_msg_manager_type
void set_message_handler(message_handler h)
Client config with asio transport and TLS disabled.
virtual char const * what() const
static level const all
Special aggregate value representing "all levels".
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)
connection_ptr get_connection(uri_ptr location, lib::error_code &ec)
Get a new connection.
type::alog_type alog_type