I'm pretty new to WebSocket in C++ and trying to use websocketpp library from Github https://github.com/zaphoyd/websocketpp. Since as I said I'm new I still not able to figure out how to use it. I'm trying to run some sample WebSocket program from the same sample repo.
Can someone please tell me in detail how to use it. I have cloned the repo in my local system and compiling this sample file
#include <iostream>
#include <websocketpp/config/asio_no_tls.hpp>
#include <websocketpp/server.hpp>
typedef websocketpp::server<websocketpp::config::asio> server;
void on_message(websocketpp::connection_hdl hdl, server::message_ptr msg)
{
std::cout << msg->get_payload() << std::endl;
}
int main()
{
server print_server;
print_server.set_message_handler(&on_message);
print_server.init_asio();
print_server.listen(9002);
print_server.start_accept();
print_server.run();
}
throw the error fatal error: websocketpp/config/asio_no_tls.hpp: No such file or directory #include <websocketpp/config/asio_no_tls.hpp> moreover seraching the error button it shows includePath error.
Help me out. Thanks alot in advance.