Package | Description |
---|---|
io.jooby | |
io.jooby.internal |
Modifier and Type | Method and Description |
---|---|
default WebSocket |
WebSocket.attribute(String key,
Object value)
Set an application attribute.
|
default WebSocket |
WebSocket.close()
Close the web socket and send a
WebSocketCloseStatus.NORMAL code to client. |
WebSocket |
WebSocket.close(WebSocketCloseStatus closeStatus)
Close the web socket and send a close status code to client.
|
default WebSocket |
WebSocket.render(Object value)
Encode a value and send a text message to client.
|
WebSocket |
WebSocket.render(Object value,
boolean broadcast)
Encode a value and send a text message to current client (broadcast = false) or to ALL
connected clients under the websocket path (broadcast = true).
|
default WebSocket |
WebSocket.send(byte[] message)
Send a text message to client.
|
WebSocket |
WebSocket.send(byte[] message,
boolean broadcast)
Send a text message to current client (broadcast = false) or to ALL connected clients under the
websocket path (broadcast = true).
|
default WebSocket |
WebSocket.send(String message)
Send a text message to client.
|
WebSocket |
WebSocket.send(String message,
boolean broadcast)
Send a text message to current client (broadcast = false) or to ALL connected clients under the
websocket path (broadcast = true).
|
Modifier and Type | Method and Description |
---|---|
List<WebSocket> |
WebSocket.getSessions()
Web sockets connected to the same path.
|
Modifier and Type | Method and Description |
---|---|
void |
WebSocket.OnClose.onClose(WebSocket ws,
WebSocketCloseStatus closeStatus)
Generated when client close the connection or when explicit calls to
close(WebSocketCloseStatus) . |
void |
WebSocket.OnConnect.onConnect(WebSocket ws)
On connect callback with recently created web socket.
|
void |
WebSocket.OnError.onError(WebSocket ws,
Throwable cause)
Error callback, let you listen for exception.
|
void |
WebSocket.OnMessage.onMessage(WebSocket ws,
WebSocketMessage message)
Generated when a client send a message.
|
static Context |
Context.websocket(Context ctx,
WebSocket ws)
Wrap a HTTP context and make it WebSocket friendly.
|
Constructor and Description |
---|
WebSocketSender(Context context,
WebSocket ws) |
Copyright © 2022. All rights reserved.