

If you need to develop a software based on Boost Asio, Use ws Server of, The complete beginning should be as follows : If you need to develop a software based on Boost Asio, Use ws Server of, The header files to include are as follows :ĮndPoint As the last concrete object to be implemented, That is, what kind of configured server or client. Server_config Server Client Client_configĬore core.hpp core_client.hpp core_clientĪsio asio_no_tls.hpp asio_no_tls_client.hpp asio_clientĪsio_tls asio.hpp asio_client.hpp asio_tls_client Such, According to Role and Config Combine, It can realize all kinds of Client and Server, as follows : Ĭonfig::asio_tls, Use Boost Of Asio library, Provide complete wss function. Ĭonfig::asio, Use Boost Of Asio library, Provide complete ws function. Ĭonfig Mainly used to configure client perhaps server Properties of ,WebSocketpp Mainly provides 3 Configuration :Ĭonfig::core, Configuration of limited functions, be based on C++11 The function of, Unwanted Boost Library support.

If you are developing a server (Server), Must include, You can use it later websocketpp::server Template classes to create servers with different configurations. If you are developing a client (Client), Must include, You can use it later websocketpp::client Template classes to create clients with different configurations. Role There are two kinds of, Namely Server and Client, Well understood. In your project WebSocketpp Realization WebSocket Client or server, Basic to include Two kinds of header files, One is the header file that determines the programming role (Role), The other is to configure the configuration header file of the programming role (Config). G++ echo_client.cpp -o echo_client -lboost_system -lpthread G++ echo_server.cpp -o echo_server -lboost_system -lpthread Īt present ,WebSocketpp 0.8.1 Most compatible Boost The version is 1.69.0,WebSocketpp Compatibility problem Compile the execution example Make & sudo make install, install WebSocket library, Default on /usr/local/include in. Go to the official website to download the source code ,WebSocketppĮstablish build Catalog, For storage cmake Generated intermediate files. Download and installĪs mentioned earlier ,WebSocketpp be based on Boost Of Asio library, And if you want to implement wss, It will take libssl-dev Library support. WebSocketpp The bottom layer uses C++ Of iostream Libraries and based on Boost Of Asio library. WebSocketpp Is just a header file C++ library, It has achieved WebSocket agreement (rfc 6455), The client and server can be easily and concisely implemented in the project. WebSocket and HTTP Both are application layer protocols, It can be implemented in various programming languages. WebSocket bring CS The data exchange between becomes simpler, allow S Active direction C Push data. WebSocket yes HTML5 Start by offering one in a single TCP A protocol for full duplex communication on a connection.
