|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public static interface WebSocket.FrameConnection
Frame Level Connection
The Connection interface at the level of sending/receiving frames rather than messages. Also contains methods to decode/generate flags and opcodes without using constants, so that code can be written to work with multiple drafts of the protocol.
Method Summary | |
---|---|
byte |
binaryOpcode()
|
byte |
continuationOpcode()
|
byte |
finMask()
|
boolean |
isAllowFrameFragmentation()
|
boolean |
isBinary(byte opcode)
|
boolean |
isClose(byte opcode)
|
boolean |
isContinuation(byte opcode)
|
boolean |
isControl(byte opcode)
|
boolean |
isMessageComplete(byte flags)
|
boolean |
isPing(byte opcode)
|
boolean |
isPong(byte opcode)
|
boolean |
isText(byte opcode)
|
void |
sendControl(byte control,
byte[] data,
int offset,
int length)
Send a control frame |
void |
sendFrame(byte flags,
byte opcode,
byte[] data,
int offset,
int length)
Send an arbitrary frame |
void |
setAllowFrameFragmentation(boolean allowFragmentation)
Set if frames larger than the frame buffer are handled with local fragmentations |
byte |
textOpcode()
|
Methods inherited from interface org.eclipse.jetty.websocket.WebSocket.Connection |
---|
close, close, disconnect, getMaxBinaryMessageSize, getMaxIdleTime, getMaxTextMessageSize, getProtocol, isOpen, sendMessage, sendMessage, setMaxBinaryMessageSize, setMaxIdleTime, setMaxTextMessageSize |
Method Detail |
---|
byte binaryOpcode()
byte textOpcode()
byte continuationOpcode()
byte finMask()
void setAllowFrameFragmentation(boolean allowFragmentation)
allowFragmentation
- boolean isMessageComplete(byte flags)
flags
- The flags bytes of a frame
boolean isControl(byte opcode)
opcode
-
boolean isText(byte opcode)
opcode
-
boolean isBinary(byte opcode)
opcode
-
boolean isContinuation(byte opcode)
opcode
-
boolean isClose(byte opcode)
opcode
-
boolean isPing(byte opcode)
opcode
-
boolean isPong(byte opcode)
opcode
-
boolean isAllowFrameFragmentation()
void sendControl(byte control, byte[] data, int offset, int length) throws IOException
control
- data
- offset
- length
-
IOException
void sendFrame(byte flags, byte opcode, byte[] data, int offset, int length) throws IOException
flags
- opcode
- data
- offset
- length
-
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |