Encodes a web socket frame into wire protocol version 8 format. This code was forked from webbit and modified.
| 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 | WebSocket08FrameEncoder(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 tothe message to encode to an other one msg, List<Object> the out)List into which the encoded msg should be added
needs to do some kind of aggregationImplements abstract 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 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 | |
| WebSocket08FrameEncoder | back to summary |
|---|---|
| public WebSocket08FrameEncoder(boolean maskPayload) Constructor
| |
| encode | back to summary |
|---|---|
| protected void encode(ChannelHandlerContext ctx, WebSocketFrame msg, List<Object> out) throws Exception Implements abstract io. Doc from io. Encode from one message to an other. This method will be called for each written message that can be handled by this encoder.
| |