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.
@Deprecated public class WebSocketFrameDecoder extends ReplayingDecoder<VoidEnum>
ChannelHandler.Sharable
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_FRAME_SIZE
Deprecated.
|
cumulation, DEFAULT_MAX_COMPOSITEBUFFER_COMPONENTS
Constructor and Description |
---|
WebSocketFrameDecoder()
Deprecated.
|
WebSocketFrameDecoder(int maxFrameSize)
Deprecated.
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)
Deprecated.
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 static final int DEFAULT_MAX_FRAME_SIZE
public WebSocketFrameDecoder()
public WebSocketFrameDecoder(int 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-2015 The Netty Project. All Rights Reserved.