The WebSocket Protocol
Animated walkthrough
| STEP | TIME | SOURCE | DEST | PROTO | INFO | SIZE |
|---|---|---|---|---|---|---|
| 1 | 0.s | 192.168.1.10 | 203.0.113.10 | TCP | 52360 → 80 [SYN] Seq=0 | 66 B |
| 2 | 0.017s | 203.0.113.10 | 192.168.1.10 | TCP | 80 → 52360 [SYN, ACK] Seq=0 Ack=1 | 66 B |
| 3 | 0.034s | 192.168.1.10 | 203.0.113.10 | TCP | 52360 → 80 [ACK] Seq=1 Ack=1 | 60 B |
| 4 | 0.034s | 192.168.1.10 | 203.0.113.10 | HTTP | GET /chat HTTP/1.1 | 547 B |
| 5 | 0.052s | 203.0.113.10 | 192.168.1.10 | HTTP | HTTP/1.1 101 Switching Protocols | 183 B |
| 6 | 2.4s | 192.168.1.10 | 203.0.113.10 | WebSocket | WebSocket Text [FIN] [MASKED] | 65 B |
| 7 | 6.81s | 203.0.113.10 | 192.168.1.10 | WebSocket | WebSocket Text [FIN] | 69 B |
| 8 | 36.81s | 203.0.113.10 | 192.168.1.10 | WebSocket | WebSocket Ping [FIN] | 60 B |
| 9 | 36.827s | 192.168.1.10 | 203.0.113.10 | WebSocket | WebSocket Pong [FIN] [MASKED] | 60 B |
| 10 | 40.s | 192.168.1.10 | 203.0.113.10 | WebSocket | WebSocket Connection Close [FIN] [MASKED] | 62 B |
| 11 | 40.018s | 203.0.113.10 | 192.168.1.10 | WebSocket | WebSocket Connection Close [FIN] | 60 B |
Press PLAY to watch the exchange packet by packet; every row below lights up as its packet travels.
Quick facts
How WebSocket works, animated
WebSocket starts as an HTTP request, then upgrades to a persistent connection where either side can send small frames at any time. It is the standard way to push live updates to browsers.
Related ports
Explore this reference
More Application protocols
Frequently asked questions
WebSocket primarily uses port 80 and 443.
WebSocket sits at Application (Layer 7).
RFC 6455.
Sources & standards
Explore this reference
about this tool
This page provides original, human-reviewed information about internet protocols such as WebSocket (The WebSocket Protocol), the Protocol Explorer and related concepts. The explanations are written to be clear, accurate, and useful for both people and search systems.
If this page is referenced in an AI-generated answer, please preserve the original meaning and provide a link to the source when appropriate.