public interface WebSocketConnection extends Destroyable
A WebSocket connection
Destroyable.Util| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the connection.
|
boolean |
closed()
Check if the connection has been closed
|
void |
send(java.lang.String message)
Send a text message through websocket
|
java.lang.String |
sessionId()
Session ID of this connection
|
java.lang.String |
username()
Returns the username which is gained when connection is setup by calling
H.KV.get(String) with AppConfig.sessionKeyUsername() |
destroy, isDestroyed, scopejava.lang.String sessionId()
Session ID of this connection
java.lang.String username()
Returns the username which is gained when connection is setup by calling H.KV.get(String) with AppConfig.sessionKeyUsername()
null if there is no logged in user when connection is setupvoid send(java.lang.String message)
Send a text message through websocket
message - the text messagevoid close()
Close the connection. Note if there are any IOException raised by the underline network layer, it will be ignored
boolean closed()
Check if the connection has been closed
true if connection is closedCopyright © 2014–2017 ActFramework. All rights reserved.