websocketpp
websocketpp copied to clipboard
tcp::no_delay option(true) on a class (WebSocket++/0.8.3-dev)
I made a class:
This is the constructor:
clsClient() {
client_.set_socket_init_handler(bind(&clsClient::on_socket_init, this, ::_1, ::_2));
}
and the on_socket_init() method:
void on_socket_init(hdlt hdl, boost::asio::ip::tcp::socket& s) {
std::cout << "Socket Initialized" << std::endl;
websocketpp::lib::asio::ip::tcp::no_delay option(true);
s.set_option(option);
}
but bind on the constructor gives me error
(WebSocket++/0.8.3-dev)
I have also encountered this problem, after I bind the callback function triggers a direct crash Have you solved this problem?