Encodes a web socket frame into wire protocol version 13 format. V13 is essentially the same as V8.
| Modifier and Type | Field and Description |
|---|---|
| private static final int | GATHERING_WRITE_THRESHOLD
The size threshold for gathering writes. |
| private static final InternalLogger | |
| private final boolean | |
| private static final byte | |
| private static final byte | |
| private static final byte | |
| private static final byte | |
| private static final byte | |
| private static final byte |
| Access | Constructor and Description |
|---|---|
| public | WebSocket13FrameEncoder(boolean
Web socket clients must set this to true to mask payload. Server implementations must set this to
false. maskPayload)Constructor |
| Modifier and Type | Method and Description |
|---|---|
| protected void | encode(ChannelHandlerContext
the ctx, WebSocketFrame ChannelHandlerContext which this MessageToMessageEncoder belongs to.the message to encode to another one. msg, List<Object> the out)List into which produced output messages should be added.Overrides io. |
| GATHERING_WRITE_THRESHOLD | back to summary |
|---|---|
| private static final int GATHERING_WRITE_THRESHOLD The size threshold for gathering writes. Non-Masked messages bigger than this size will be be sent fragmented as
a header and a content ByteBuf whereas messages smaller than the size will be merged into a single buffer and
sent at once. | |
| logger | back to summary |
|---|---|
| private static final InternalLogger logger | |
| maskPayload | back to summary |
|---|---|
| private final boolean maskPayload | |
| OPCODE_BINARY | back to summary |
|---|---|
| private static final byte OPCODE_BINARY | |
| OPCODE_CLOSE | back to summary |
|---|---|
| private static final byte OPCODE_CLOSE | |
| OPCODE_CONT | back to summary |
|---|---|
| private static final byte OPCODE_CONT | |
| OPCODE_PING | back to summary |
|---|---|
| private static final byte OPCODE_PING | |
| OPCODE_PONG | back to summary |
|---|---|
| private static final byte OPCODE_PONG | |
| OPCODE_TEXT | back to summary |
|---|---|
| private static final byte OPCODE_TEXT | |
| WebSocket13FrameEncoder | back to summary |
|---|---|
| public WebSocket13FrameEncoder(boolean maskPayload) Constructor
| |
| encode | back to summary |
|---|---|
| protected void encode(ChannelHandlerContext ctx, WebSocketFrame msg, List<Object> out) throws Exception Overrides io. Doc from io. Encode from one message to another. This method will be called for each written message that can be handled by this encoder. The message will be disposed of after this call.
Subclasses that wish to sometimes pass messages through, should instead override the
| |