Interface WebSocketHeader
-
public interface WebSocketHeaderRepresents 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 Summary
Fields Modifier and Type Field Description static byteFINAL_OPCODE_BINARYDetermines whether it is the final frame for the message.static byteFINBIT_MASKFIN denotes that this is the final fragment in a message.static byteMASKBIT_MASKMask to get value ofOPCODE_MASK.static byteMAX_HEADER_LENGTH_MASKEDSize of the header if the payload size is represented in 7 + 64 bits and there is a masking key.static byteMAX_HEADER_LENGTH_NOMASKSize of the header if the payload size is represented in 7 + 64 bits and there is no masking key.static byteMED_HEADER_LENGTH_MASKEDSize of the header if the payload size is represented in 7 + 16 bits and there is a masking key.static byteMED_HEADER_LENGTH_NOMASKSize of the header if the payload size is represented in 7 + 16 bits and there is no masking key.static byteMIN_HEADER_LENGTHSize of header if payload size is < 125 and there is no masking key.static byteMIN_HEADER_LENGTH_MASKEDSize of header if payload size is < 125 and there is a masking key.static byteOPCODE_BINARYDenotes a binary frame.static byteOPCODE_CLOSEDenotes a connection close.static byteOPCODE_CONTINUATIONDenotes a continuation frame.static byteOPCODE_MASKDenotes whether the "Payload data" is masked.static byteOPCODE_PINGDenotes a ping.static byteOPCODE_PONGDenotes a pong.static bytePAYLOAD_EXTENDED_16Size is 126.static bytePAYLOAD_EXTENDED_64Size is 127.static intPAYLOAD_LARGE_MAXMaximum size in bytes for the payload when using 7 + 64 bits to represent the size.static bytePAYLOAD_MASKMask to get value of payload length.static intPAYLOAD_MEDIUM_MAXMaximum size in bytes for the payload when using 7 + 16 bits to represent the size.static bytePAYLOAD_SHORT_MAXMaximum size (125) in bytes for the payload when using 7 bits to represent the size.
-
-
-
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_BINARY
static final byte OPCODE_BINARY
Denotes a binary frame.- See Also:
- Constant Field Values
-
OPCODE_CLOSE
static final byte OPCODE_CLOSE
Denotes a connection close.- See Also:
- Constant Field Values
-
OPCODE_PING
static final byte OPCODE_PING
Denotes a ping.- See Also:
- Constant Field Values
-
OPCODE_PONG
static final byte OPCODE_PONG
Denotes a pong.- See Also:
- Constant Field Values
-
MASKBIT_MASK
static final byte MASKBIT_MASK
Mask to get value ofOPCODE_MASK.- 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
-
-