| Modifier and Type | Class and Description |
|---|---|
static class |
Draft.CloseHandshakeType |
static class |
Draft.HandshakeState |
| Modifier and Type | Field and Description |
|---|---|
protected Framedata.Opcode |
continuousFrameType |
static byte[] |
FLASH_POLICY_REQUEST |
static int |
INITIAL_FAMESIZE |
static int |
MAX_FAME_SIZE |
protected WebSocket.Role |
role
In some cases the handshake will be parsed different depending on whether
|
| Constructor and Description |
|---|
Draft() |
| Modifier and Type | Method and Description |
|---|---|
abstract Draft.HandshakeState |
acceptHandshakeAsClient(ClientHandshake request,
ServerHandshake response) |
abstract Draft.HandshakeState |
acceptHandshakeAsServer(ClientHandshake handshakedata) |
protected boolean |
basicAccept(Handshakedata handshakedata) |
int |
checkAlloc(int bytecount) |
java.util.List<Framedata> |
continuousFrame(Framedata.Opcode op,
java.nio.ByteBuffer buffer,
boolean fin) |
abstract Draft |
copyInstance()
Drafts must only be by one websocket at all.
|
abstract java.nio.ByteBuffer |
createBinaryFrame(Framedata framedata) |
abstract java.util.List<Framedata> |
createFrames(java.nio.ByteBuffer binary,
boolean mask) |
abstract java.util.List<Framedata> |
createFrames(java.lang.String text,
boolean mask) |
java.util.List<java.nio.ByteBuffer> |
createHandshake(Handshakedata handshakedata,
WebSocket.Role ownrole) |
java.util.List<java.nio.ByteBuffer> |
createHandshake(Handshakedata handshakedata,
WebSocket.Role ownrole,
boolean withcontent) |
abstract Draft.CloseHandshakeType |
getCloseHandshakeType() |
WebSocket.Role |
getRole() |
abstract ClientHandshakeBuilder |
postProcessHandshakeRequestAsClient(ClientHandshakeBuilder request) |
abstract HandshakeBuilder |
postProcessHandshakeResponseAsServer(ClientHandshake request,
ServerHandshakeBuilder response) |
static java.nio.ByteBuffer |
readLine(java.nio.ByteBuffer buf) |
static java.lang.String |
readStringLine(java.nio.ByteBuffer buf) |
abstract void |
reset() |
void |
setParseMode(WebSocket.Role role) |
abstract java.util.List<Framedata> |
translateFrame(java.nio.ByteBuffer buffer) |
Handshakedata |
translateHandshake(java.nio.ByteBuffer buf) |
static HandshakeBuilder |
translateHandshakeHttp(java.nio.ByteBuffer buf,
WebSocket.Role role) |
public static int MAX_FAME_SIZE
public static int INITIAL_FAMESIZE
public static final byte[] FLASH_POLICY_REQUEST
protected WebSocket.Role role
protected Framedata.Opcode continuousFrameType
public static java.nio.ByteBuffer readLine(java.nio.ByteBuffer buf)
public static java.lang.String readStringLine(java.nio.ByteBuffer buf)
public static HandshakeBuilder translateHandshakeHttp(java.nio.ByteBuffer buf, WebSocket.Role role) throws InvalidHandshakeException, IncompleteHandshakeException
public abstract Draft.HandshakeState acceptHandshakeAsClient(ClientHandshake request, ServerHandshake response) throws InvalidHandshakeException
InvalidHandshakeExceptionpublic abstract Draft.HandshakeState acceptHandshakeAsServer(ClientHandshake handshakedata) throws InvalidHandshakeException
InvalidHandshakeExceptionprotected boolean basicAccept(Handshakedata handshakedata)
public abstract java.nio.ByteBuffer createBinaryFrame(Framedata framedata)
public abstract java.util.List<Framedata> createFrames(java.nio.ByteBuffer binary, boolean mask)
public abstract java.util.List<Framedata> createFrames(java.lang.String text, boolean mask)
public java.util.List<Framedata> continuousFrame(Framedata.Opcode op, java.nio.ByteBuffer buffer, boolean fin)
public abstract void reset()
public java.util.List<java.nio.ByteBuffer> createHandshake(Handshakedata handshakedata, WebSocket.Role ownrole)
public java.util.List<java.nio.ByteBuffer> createHandshake(Handshakedata handshakedata, WebSocket.Role ownrole, boolean withcontent)
public abstract ClientHandshakeBuilder postProcessHandshakeRequestAsClient(ClientHandshakeBuilder request) throws InvalidHandshakeException
InvalidHandshakeExceptionpublic abstract HandshakeBuilder postProcessHandshakeResponseAsServer(ClientHandshake request, ServerHandshakeBuilder response) throws InvalidHandshakeException
InvalidHandshakeExceptionpublic abstract java.util.List<Framedata> translateFrame(java.nio.ByteBuffer buffer) throws InvalidDataException
InvalidDataExceptionpublic abstract Draft.CloseHandshakeType getCloseHandshakeType()
public abstract Draft copyInstance()
public Handshakedata translateHandshake(java.nio.ByteBuffer buf) throws InvalidHandshakeException
InvalidHandshakeExceptionpublic int checkAlloc(int bytecount)
throws LimitExedeedException,
InvalidDataException
public void setParseMode(WebSocket.Role role)
public WebSocket.Role getRole()