websocket是不是http请求
时间: 2023-08-29 08:06:56 浏览: 107
websocket不是http请求,它是一种基于TCP的协议,用于在客户端和服务器之间进行全双工通信。与传统的HTTP请求不同,websocket建立起持久性的连接,可以实现服务器主动向客户端推送数据,并且能够实现实时性更强的通信。而HTTP请求是一种无状态的请求-响应协议,在每次请求后都会关闭连接,不支持服务器主动推送数据。所以,websocket和http请求是两种不同的通信方式。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [vue发送websocket请求和http post请求的实例代码](https://download.csdn.net/download/weixin_38720009/12939535)[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_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [websocket_for_linux:c语言实现的websocket的http请求回复、数据的打包解包、掩码解码处理,提供服务端和...](https://download.csdn.net/download/weixin_42110038/19149697)[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_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [通讯模型封装,基于DIOCP YxdIocp包含有支持大并发的TCP、HTTP、UDP、WebSocket服务组件](https://download.csdn.net/download/qq_35831906/88233737)[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_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文