【发布时间】:2018-04-10 14:17:32
【问题描述】:
我从here 和here 复制了简单的boost websocket 示例,效果很好。然后,我在调用创建 websocket 之前将这些行添加到服务器:
boost::beast::flat_buffer buffer;
boost::beast::http::request<boost::beast::http::string_body> req;
boost::beast::http::read(sock, buffer, req);
这些行取自this page,用于在升级到 websocket 之前读取消息的内容。服务器和客户端现在都挂在 websocket 握手上。
是我做错了什么还是这是 boost 中的错误?
【问题讨论】: