public class WebSocketParserD00 extends Object implements WebSocketParser
WebSocketParser.FrameHandler
Modifier and Type | Field and Description |
---|---|
static int |
STATE_DATA |
static int |
STATE_LENGTH |
static int |
STATE_SENTINEL_DATA |
static int |
STATE_START |
Constructor and Description |
---|
WebSocketParserD00(WebSocketBuffers buffers,
EndPoint endp,
WebSocketParser.FrameHandler handler) |
public static final int STATE_START
public static final int STATE_SENTINEL_DATA
public static final int STATE_LENGTH
public static final int STATE_DATA
public WebSocketParserD00(WebSocketBuffers buffers, EndPoint endp, WebSocketParser.FrameHandler handler)
buffers
- The buffers to use for parsing. Only the Buffers.getBuffer()
is used.
This should be a direct buffer if binary data is mostly used or an indirect buffer if utf-8 data
is mostly used.endp
- the endpointhandler
- the handler to notify when a parse event occurspublic boolean isBufferEmpty()
isBufferEmpty
in interface WebSocketParser
public Buffer getBuffer()
getBuffer
in interface WebSocketParser
public int parseNext()
WebSocketParser.FrameHandler
event or until no more data is
available. Fill data from the EndPoint
only as necessary.parseNext
in interface WebSocketParser
public void fill(Buffer buffer)
fill
in interface WebSocketParser
Copyright © 1995-2015 Mort Bay Consulting. All Rights Reserved.