WebSockets

  1. The WebSocket Protocol (RFC 6455)
    1. Protocol Overview
      1. History and Standardization
        1. Key Features of RFC 6455
        2. The Opening Handshake
          1. The Client's HTTP Upgrade Request
            1. HTTP/1.1 Upgrade Mechanism
              1. Required Request Headers
              2. Key Headers
                1. Upgrade Header
                  1. Connection Header
                    1. Sec-WebSocket-Key Header
                      1. Sec-WebSocket-Version Header
                      2. The Server's Switching Protocols Response
                        1. Status Code 101
                          1. Required Response Headers
                          2. Sec-WebSocket-Accept Header Calculation
                            1. Hashing and Encoding Process
                          3. Data Framing
                            1. The Structure of a WebSocket Frame
                              1. Frame Header
                                1. Frame Payload
                                2. FIN Bit (Final Fragment)
                                  1. Fragmentation Handling
                                  2. RSV Bits (Reserved)
                                    1. Use in Extensions
                                    2. Opcode (Operation Code)
                                      1. Continuation Frame
                                        1. Text Frame
                                          1. Binary Frame
                                            1. Connection Close Frame
                                              1. Ping Frame
                                                1. Pong Frame
                                                2. Mask Bit and Masking Key
                                                  1. Client-to-Server Masking Requirement
                                                    1. Security Implications
                                                    2. Payload Length
                                                      1. Short Payloads
                                                        1. Extended Payloads
                                                          1. Large Payloads
                                                          2. Payload Data
                                                            1. Text Encoding (UTF-8)
                                                              1. Binary Data Handling
                                                            2. Message Fragmentation
                                                              1. Fragmented Message Transmission
                                                                1. Reassembly on Receiver Side
                                                                2. Control Frames
                                                                  1. Ping/Pong for Heartbeats
                                                                    1. Keep-Alive Mechanism
                                                                      1. Detecting Dead Connections
                                                                      2. Close Frames for Graceful Shutdown
                                                                        1. Close Codes and Meanings
                                                                          1. Closing Handshake Process
                                                                        2. Subprotocols
                                                                          1. Purpose of Subprotocols
                                                                            1. Sec-WebSocket-Protocol Header
                                                                              1. Negotiation Process
                                                                                1. Examples of Common Subprotocols
                                                                                2. Extensions
                                                                                  1. Purpose and Use Cases
                                                                                    1. Sec-WebSocket-Extensions Header
                                                                                      1. Negotiation Process
                                                                                        1. Common Extensions