|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface WebSocket
Nested Class Summary | |
---|---|
static class |
WebSocket.READYSTATE
|
static class |
WebSocket.Role
|
Field Summary | |
---|---|
static int |
DEFAULT_PORT
The default port of WebSockets, as defined in the spec. |
static int |
DEFAULT_WSS_PORT
|
Method Summary | |
---|---|
void |
close()
Convenience function which behaves like close(CloseFrame.NORMAL) |
void |
close(int code)
|
void |
close(int code,
String message)
sends the closing handshake. |
void |
closeConnection(int code,
String message)
This will close the connection immediately without a proper close handshake. |
Draft |
getDraft()
|
InetSocketAddress |
getLocalSocketAddress()
|
WebSocket.READYSTATE |
getReadyState()
Retrieve the WebSocket 'readyState'. |
InetSocketAddress |
getRemoteSocketAddress()
|
boolean |
hasBufferedData()
|
boolean |
isClosed()
Returns whether the close handshake has been completed and the socket is closed. |
boolean |
isClosing()
|
boolean |
isConnecting()
|
boolean |
isFlushAndClose()
Returns true when no further frames may be submitted This happens before the socket connection is closed. |
boolean |
isOpen()
|
void |
send(byte[] bytes)
|
void |
send(ByteBuffer bytes)
Send Binary data (plain bytes) to the other end. |
void |
send(String text)
Send Text data to the other end. |
void |
sendFrame(Framedata framedata)
|
Field Detail |
---|
static final int DEFAULT_PORT
static final int DEFAULT_WSS_PORT
Method Detail |
---|
void close(int code, String message)
void close(int code)
void close()
void closeConnection(int code, String message)
void send(String text) throws NotYetConnectedException
IllegalArgumentException
NotYetConnectedException
void send(ByteBuffer bytes) throws IllegalArgumentException, NotYetConnectedException
IllegalArgumentException
NotYetConnectedException
void send(byte[] bytes) throws IllegalArgumentException, NotYetConnectedException
IllegalArgumentException
NotYetConnectedException
void sendFrame(Framedata framedata)
boolean hasBufferedData()
InetSocketAddress getRemoteSocketAddress()
InetSocketAddress getLocalSocketAddress()
boolean isConnecting()
boolean isOpen()
boolean isClosing()
boolean isFlushAndClose()
boolean isClosed()
Draft getDraft()
WebSocket.READYSTATE getReadyState()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |