44 {
45
46 std::string uri = "ws://localhost:9001";
47
48 if (argc == 2) {
50 }
51
52 try {
53
56
57
59
60
63
64 websocketpp::lib::error_code ec;
66
67
68 con->add_subprotocol("sip");
69
71
72
74
76 boost::this_thread::sleep(boost::posix_time::milliseconds(100));
77 }
78
79 std::cout << "done" << std::endl;
80
82 std::cout << e.
what() << std::endl;
83 }
84}
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
void set_message_handler(message_handler h)
void clear_access_channels(log::level channels)
Clear Access logging channels.
void set_open_handler(open_handler h)
void clear_error_channels(log::level channels)
Clear Error logging channels.
virtual char const * what() const
void on_message(client *c, websocketpp::connection_hdl hdl, message_ptr msg)
void on_open(client *c, websocketpp::connection_hdl hdl)
static level const all
Special aggregate value representing "all levels".
static level const all
Special aggregate value representing "all levels".