Open sasmaster opened 7 years ago
I got it. I didn't have include for
I had a similar error on Windows, though the same code works fine on Linux.
Specifically, passing the likes of asio::ip::address()
(i.e., constructed by default) does not work (on Windows only), but making it up from a dotted address like asio::ip::address::from_string("127.0.0.1")
works.
What did you mean by "I didn't have include for
Hi. I am just following the echo_server.cpp example. I am getting this error when calling server.listen()
And try..catch() issues the error:
My setup:
Win10 64bit, Visual C++ 140 64bit ,Standalone ASIO.
Also here is the whole setup:
mServer.set_access_channels(websocketpp::log::alevel::all); mServer.clear_access_channels(websocketpp::log::alevel::frame_payload); //init asio mServer.init_asio(); mServer.set_message_handler(std::bind(&WebSocketServer::on_message, this, std::placeholders::_1, std::placeholders::_2)); mServer.set_open_handler(std::bind(&WebSocketServer::OnOpen, this, std::placeholders::_1)); mServer.set_close_handler(std::bind(&WebSocketServer::OnClose, this, std::placeholders::_1)); mServer.set_fail_handler(std::bind(&WebSocketServer::OnFail, this, std::placeholders::_1)); mServer.set_http_handler(std::bind(&WebSocketServer::OnHTTP, this, std::placeholders::_1));