Interface WebSocketHeader


  • public interface WebSocketHeader
    Represents a web socket header. +---------------------------------------------------------------+ 0 1 2 3 | 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 len==126/127) | | |1|2|3| |K| | | +-+-+-+-+-------+-+-------------+ - - - - - - - - - - - - - - - + | Extended payload length continued, if payload len == 127 | + - - - - - - - - - - - - - - - +-------------------------------+ | | Masking-key, if MASK set to 1 | +-------------------------------+-------------------------------+ | Masking-key (continued) | Payload Data | +-------------------------------- - - - - - - - - - - - - - - - + : Payload Data continued ... : + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + | Payload Data continued ... | +---------------------------------------------------------------+
    See Also:
    RFC6455: Base Framing Protocol
    • Field Detail

      • MIN_HEADER_LENGTH

        static final byte MIN_HEADER_LENGTH
        Size of header if payload size is < 125 and there is no masking key.
        See Also:
        Constant Field Values
      • MIN_HEADER_LENGTH_MASKED

        static final byte MIN_HEADER_LENGTH_MASKED
        Size of header if payload size is < 125 and there is a masking key.
        See Also:
        Constant Field Values
      • MED_HEADER_LENGTH_NOMASK

        static final byte MED_HEADER_LENGTH_NOMASK
        Size of the header if the payload size is represented in 7 + 16 bits and there is no masking key.
        See Also:
        Constant Field Values
      • MED_HEADER_LENGTH_MASKED

        static final byte MED_HEADER_LENGTH_MASKED
        Size of the header if the payload size is represented in 7 + 16 bits and there is a masking key.
        See Also:
        Constant Field Values
      • MAX_HEADER_LENGTH_NOMASK

        static final byte MAX_HEADER_LENGTH_NOMASK
        Size of the header if the payload size is represented in 7 + 64 bits and there is no masking key.
        See Also:
        Constant Field Values
      • MAX_HEADER_LENGTH_MASKED

        static final byte MAX_HEADER_LENGTH_MASKED
        Size of the header if the payload size is represented in 7 + 64 bits and there is a masking key.
        See Also:
        Constant Field Values
      • FINBIT_MASK

        static final byte FINBIT_MASK
        FIN denotes that this is the final fragment in a message.
        See Also:
        Constant Field Values
      • OPCODE_MASK

        static final byte OPCODE_MASK
        Denotes whether the "Payload data" is masked. If set to 1, a masking key is present in 'masking-key' and this will be used to unmask the "Payload data".
        See Also:
        Constant Field Values
      • OPCODE_CONTINUATION

        static final byte OPCODE_CONTINUATION
        Denotes a continuation frame.
        See Also:
        Constant Field Values
      • OPCODE_CLOSE

        static final byte OPCODE_CLOSE
        Denotes a connection close.
        See Also:
        Constant Field Values
      • PAYLOAD_MASK

        static final byte PAYLOAD_MASK
        Mask to get value of payload length.
        See Also:
        Constant Field Values
      • FINAL_OPCODE_BINARY

        static final byte FINAL_OPCODE_BINARY
        Determines whether it is the final frame for the message.
        See Also:
        Constant Field Values
      • PAYLOAD_SHORT_MAX

        static final byte PAYLOAD_SHORT_MAX
        Maximum size (125) in bytes for the payload when using 7 bits to represent the size.
        See Also:
        Constant Field Values
      • PAYLOAD_MEDIUM_MAX

        static final int PAYLOAD_MEDIUM_MAX
        Maximum size in bytes for the payload when using 7 + 16 bits to represent the size.
        See Also:
        Constant Field Values
      • PAYLOAD_LARGE_MAX

        static final int PAYLOAD_LARGE_MAX
        Maximum size in bytes for the payload when using 7 + 64 bits to represent the size.
        See Also:
        Constant Field Values
      • PAYLOAD_EXTENDED_16

        static final byte PAYLOAD_EXTENDED_16
        Size is 126.
        See Also:
        Constant Field Values
      • PAYLOAD_EXTENDED_64

        static final byte PAYLOAD_EXTENDED_64
        Size is 127.
        See Also:
        Constant Field Values