public class WebSocket08FrameEncoder extends OneToOneEncoder
Encodes a web socket frame into wire protocol version 8 format. This code was forked from webbit and modified.
ChannelHandler.Sharable| 构造器和说明 |
|---|
WebSocket08FrameEncoder(boolean maskPayload)
Constructor
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected java.lang.Object |
encode(ChannelHandlerContext ctx,
Channel channel,
java.lang.Object msg)
Transforms the specified message into another message and return the
transformed message.
|
doEncode, handleDownstreampublic WebSocket08FrameEncoder(boolean maskPayload)
maskPayload - Web socket clients must set this to true to mask payload. Server implementations must set this to
false.protected java.lang.Object encode(ChannelHandlerContext ctx, Channel channel, java.lang.Object msg) throws java.lang.Exception
OneToOneEncodernull, unlike
you can in OneToOneDecoder.decode(ChannelHandlerContext, Channel, Object);
you must return something, at least ChannelBuffers.EMPTY_BUFFER.encode 在类中 OneToOneEncoderjava.lang.Exception