public class WebSocket00FrameDecoder extends ReplayingDecoder<VoidEnum>
ChannelBuffer
s into WebSocketFrame
s.
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.Sharable
cumulation, DEFAULT_MAX_COMPOSITEBUFFER_COMPONENTS
Constructor and Description |
---|
WebSocket00FrameDecoder() |
WebSocket00FrameDecoder(long maxFrameSize)
Creates a new instance of
WebSocketFrameDecoder with the specified maxFrameSize . |
Modifier and Type | Method and Description |
---|---|
protected 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, setState
actualReadableBytes, afterAdd, afterRemove, appendToCumulation, beforeAdd, beforeRemove, channelClosed, channelDisconnected, exceptionCaught, extractFrame, getMaxCumulationBufferCapacity, getMaxCumulationBufferComponents, isUnfold, newCumulationBuffer, replace, setMaxCumulationBufferCapacity, setMaxCumulationBufferComponents, setUnfold, unfoldAndFireMessageReceived, updateCumulation
channelBound, channelConnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, handleUpstream, writeComplete
public 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 Object decode(ChannelHandlerContext ctx, Channel channel, ChannelBuffer buffer, VoidEnum state) throws Exception
ReplayingDecoder
decode
in class 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)Exception
Copyright © 2008-2016 The Netty Project. All Rights Reserved.