public class WebSocket00FrameDecoder extends ReplayingDecoder<VoidEnum>
ChannelBuffers into WebSocketFrames.
For the detailed instruction on adding add Web Socket support to your HTTP server, take a look into the
WebSocketServer example located in the org.jboss.netty.example.http.websocket package.
ChannelHandler.Sharablecumulation, DEFAULT_MAX_COMPOSITEBUFFER_COMPONENTS| 构造器和说明 |
|---|
WebSocket00FrameDecoder() |
WebSocket00FrameDecoder(long maxFrameSize)
Creates a new instance of
WebSocketFrameDecoder with the specified maxFrameSize. |
| 限定符和类型 | 方法和说明 |
|---|---|
protected java.lang.Object |
decode(ChannelHandlerContext ctx,
Channel channel,
ChannelBuffer buffer,
VoidEnum state)
Decodes the received packets so far into a frame.
|
checkpoint, checkpoint, cleanup, decode, decodeLast, decodeLast, getState, internalBuffer, messageReceived, setStateactualReadableBytes, afterAdd, afterRemove, appendToCumulation, beforeAdd, beforeRemove, channelClosed, channelDisconnected, exceptionCaught, extractFrame, getMaxCumulationBufferCapacity, getMaxCumulationBufferComponents, isUnfold, newCumulationBuffer, replace, setMaxCumulationBufferCapacity, setMaxCumulationBufferComponents, setUnfold, unfoldAndFireMessageReceived, updateCumulationchannelBound, channelConnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, handleUpstream, writeCompletepublic WebSocket00FrameDecoder()
public WebSocket00FrameDecoder(long maxFrameSize)
WebSocketFrameDecoder with the specified maxFrameSize. If the client
sends a frame size larger than maxFrameSize, the channel will be closed.maxFrameSize - the maximum frame size to decodeprotected java.lang.Object decode(ChannelHandlerContext ctx, Channel channel, ChannelBuffer buffer, VoidEnum state) throws java.lang.Exception
ReplayingDecoderdecode 在类中 ReplayingDecoder<VoidEnum>ctx - the context of this handlerchannel - the current channelbuffer - the cumulative buffer of received packets so far.
Note that the buffer might be empty, which means you
should not make an assumption that the buffer contains
at least one byte in your decoder implementation.state - the current decoder state (null if unused)java.lang.Exception