Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- WebSocket frame layout
- (RFC 6455 5.2)
- BYTE 1 BYTE 2 BYTE 3 BYTE 4
- ┌───────────────┬───────────────┬───────────────┬───────────────┐
- │0 │ 1 │ 2 │ 3 │
- BITS: │0 1 2 3 4 5 6 7│8 9 0 1 2 3 4 5│6 7 8 9 0 1 2 3│4 5 6 7 8 9 0 1│
- ├─┬─┬─┬─┬───────┼─┬─────────────┼───────────────┴───────────────┤
- │F│R│R│R│ opcode│M│ Payload len │ Extended payload length │
- │I│S│S│S│ (4) │A│ (7) │ (16 / 64) │
- │N│V│V│V│ │S│ │ (if payload length = 126/127) │
- │ │1│2│3│ │K│ │ │
- ├─┴─┴─┴─┴───────┴─┴─────────────┘┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈│
- │ Extended payload length continued, if payload length == 127 │
- │ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┌───────────────────────────────┤
- │ │ Masking-key, if MASK set to 1 │
- ├───────────────────────────────┼───────────────────────────────┤
- │ Masking-key (continued) │ Payload Data │
- ├───────────────────────────────┘ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ │
- ┊ ┊
- ┊ Payload Data continued ... ┊
- ┊ ┊
- ┊┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈┊
- ┊ Payload Data continued ... ┊
- └───────────────────────────────────────────────────────────────┘
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement