Web Sockets
WebSockets support plugin. It is required to be installed first before binding any websocket endpoints
install(WebSockets)
install(Routing) {
webSocket("/ws") {
incoming.consumeForEach { ... }
}
}Content copied to clipboard
Parameters
ping Interval Millis
duration between pings or PINGER_DISABLED to disable pings.
timeout Millis
write/ping timeout after that a connection will be closed.
max Frame Size
maximum frame that could be received or sent.
masking
whether masking need to be enabled (useful for security).
extensions Config
is configuration for WebSocket extensions.
Types
Link copied to clipboard
Plugin installation object.
Link copied to clipboard
class WebSocketOptions
Websockets configuration options