Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4909

General discussion • Re: How to implement WebSockets with HTTP 101 and required headers?

$
0
0
To implement WebSockets with HTTP 101:

Client Request: Send headers:
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Key: <Base64>
Sec-WebSocket-Version: 13

Server Response: Reply with 101 Switching Protocols and:
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Accept: <Hashed Key>

For details, check MDN WebSocket API and RFC 6455......

Statistics: Posted by azmatseo — Fri Jan 10, 2025 5:26 am



Viewing all articles
Browse latest Browse all 4909

Trending Articles