We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
websocket实现了全双工实时通信 本身tcp协议就是可以全双工实时通信的,但是http协议的请求-应答机制限制了全双工通信; 首先通过http的get请求,进行协议升级,前端和服务端商量着绕过http协议;
// 请求头 GET ws://localhost:3000/ws/chat HTTP/1.1 Host: localhost Upgrade: websocket Connection: Upgrade Origin: http://localhost:3000 Sec-WebSocket-Key: client-random-string Sec-WebSocket-Version: 13
// 响应头 HTTP/1.1 101 Switching Protocols Upgrade: websocket Connection: Upgrade Sec-WebSocket-Accept: server-random-string
The text was updated successfully, but these errors were encountered:
No branches or pull requests
websocket实现了全双工实时通信
本身tcp协议就是可以全双工实时通信的,但是http协议的请求-应答机制限制了全双工通信;
首先通过http的get请求,进行协议升级,前端和服务端商量着绕过http协议;
The text was updated successfully, but these errors were encountered: