I have a question to this Boost.Beast example:
In line 643 a WebSocket upgrade is done. However, if I understand it correctly, there may still be HTTP write commands in the queue that are asynchronously executed. They are thus executed in parallel to the current WebSocket communication. Is that legal? Or have I not yet fully understood the example?
答案 0 :(得分:0)
在发送101个交换协议响应后发送HTTP响应是不合法的。但这不可能发生,因为只要服务器收到升级HTTP请求,它就会遵循升级过程。发送升级请求后发送另一个正常HTTP请求的客户端将出错。