|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public static interface WebSocket.Connection
A Connection interface is passed to a WebSocket instance via the WebSocket.onOpen(Connection)
to
give the application access to the specifics of the current connection. This includes methods
for sending frames and messages as well as methods for interpreting the flags and opcodes of the connection.
Method Summary | |
---|---|
void |
disconnect()
|
int |
getMaxBinaryMessageSize()
Size in bytes of the maximum binary message to be received |
int |
getMaxTextMessageSize()
Size in characters of the maximum text message to be received |
String |
getProtocol()
|
boolean |
isOpen()
|
void |
sendMessage(byte[] data,
int offset,
int length)
|
void |
sendMessage(String data)
|
void |
setMaxBinaryMessageSize(int size)
|
void |
setMaxTextMessageSize(int size)
|
Method Detail |
---|
String getProtocol()
void sendMessage(String data) throws IOException
IOException
void sendMessage(byte[] data, int offset, int length) throws IOException
IOException
void disconnect()
boolean isOpen()
void setMaxTextMessageSize(int size)
size
- size<0 No aggregation of frames to messages, >=0 max size of text frame aggregation buffer in charactersvoid setMaxBinaryMessageSize(int size)
size
- size<0 no aggregation of binary frames, >=0 size of binary frame aggregation bufferint getMaxTextMessageSize()
int getMaxBinaryMessageSize()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |