限定符和类型 | 类和说明 |
---|---|
static class |
Draft.CloseHandshakeType
Enum which represents type of handshake is required for a close
|
static class |
Draft.HandshakeState
Enum which represents the states a handshake may be in
|
限定符和类型 | 字段和说明 |
---|---|
static byte[] |
FLASH_POLICY_REQUEST |
static int |
INITIAL_FAMESIZE |
static int |
MAX_FAME_SIZE |
构造器和说明 |
---|
Draft() |
限定符和类型 | 方法和说明 |
---|---|
abstract Draft.HandshakeState |
acceptHandshakeAsClient(ClientHandshake request,
ServerHandshake response) |
abstract Draft.HandshakeState |
acceptHandshakeAsServer(ClientHandshake 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
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
public abstract Draft.HandshakeState acceptHandshakeAsServer(ClientHandshake handshakedata) throws InvalidHandshakeException
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
public abstract HandshakeBuilder postProcessHandshakeResponseAsServer(ClientHandshake request, ServerHandshakeBuilder response) throws InvalidHandshakeException
public abstract java.util.List<Framedata> translateFrame(java.nio.ByteBuffer buffer) throws InvalidDataException
public abstract Draft.CloseHandshakeType getCloseHandshakeType()
public abstract Draft copyInstance()
public Handshakedata translateHandshake(java.nio.ByteBuffer buf) throws InvalidHandshakeException
public int checkAlloc(int bytecount) throws LimitExedeedException, InvalidDataException
public void setParseMode(WebSocket.Role role)
public WebSocket.Role getRole()