websocket vc++
时间: 2023-09-02 09:14:41 浏览: 104
WebSocket可以用于网页和VC程序之间的交互。在VC程序中使用WebSocket需要下载并配置好OpenSSL和Boost库,然后下载WebSocket源码。WebSocket使用HTTP协议进行第一次握手,握手请求的格式如下:
GET /chat HTTP/1.1
Host: server.example.com
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Key: x3JJHMbDL1EzLkh9GBhXDw==
Sec-WebSocket-Protocol: chat, superchat
Sec-WebSocket-Version: 13
Origin: http://example.com
客户端通知服务器后,建立WebSocket连接并利用WebSocket进行通信。在通信过程中,还有一些不同的参数,如通信秘钥(Sec-WebSocket-Key)、协议支持的功能(Sec-WebSocket-Protocol)和版本号(Sec-WebSocket-Version)。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [Vc++ - server-WebSocket概述](https://blog.csdn.net/wjl18270365476/article/details/106987616)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [vc websocket简单测试](https://blog.csdn.net/bangtanhui/article/details/125498219)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文