+++序列配置为Server
发布时间
阅读量:
阅读量
websocket服务器主要包含以下内容: (1) 配置日志等级
(2) 完成asio的初始化操作
(3) 确定默认的Handler处理函数
(4) 执行监听listen()函数以及启动连接接收start_accept()函数
(5) 调用run()方法以运行服务器
// The ASIO_STANDALONE define is necessary to use the standalone version of Asio.
// Remove if you are using Boost Asio.
// #define ASIO_STANDALONE
// 不使用TLS
#include <websocketpp/config/asio_no_tls.hpp>
#include <websocketpp/server.hpp>
// 使用TLS
// #include <websocketpp/config/asio.hpp>
// #include <websocketpp/server.hpp>
#include <functional>
typedef
全部评论 (0)
还没有任何评论哟~
