webSocketRaw
Binds RAW WebSocket at the current route + path optionally checking the for WebSocket protocol (ignored if null
) Requires WebSockets plugin to be installed.
Unlike regular (default) webSocket, a raw WebSocket is not handling any ping/pongs, timeouts or close frames. So WebSocketSession.incoming channel will contain all low-level control frames and all fragmented frames need to be reassembled.
When a WebSocket session is created, a handler lambda will be called with WebSocket session instance on receiver. Once handler function returns, the WebSocket connection will be terminated immediately. For RAW WebSockets it is important to perform close sequence properly.
Bind RAW WebSocket at the current route + path optionally checking for the WebSocket protocol (ignored if null
) Requires WebSockets plugin to be installed.
Unlike regular (default) webSocket, a raw WebSocket is not handling any ping/pongs, timeouts or close frames. So WebSocketSession.incoming channel will contain all low-level control frames and all fragmented frames need to be reassembled.
When a WebSocket session is created, a handler lambda will be called with WebSocket session instance on receiver. Once handler function returns, the WebSocket connection will be terminated immediately. For RAW WebSockets it is important to perform close sequence properly.
Parameters
indicates if the server should negotiate installed WebSocket extensions.
Bind RAW WebSocket at the current route optionally checking for the WebSocket protocol (ignored if null
) Requires WebSockets plugin to be installed.
Unlike regular (default) webSocket, a raw WebSocket is not handling any ping/pongs, timeouts or close frames. So WebSocketSession's incoming channel will contain all low-level control frames and all fragmented frames need to be reassembled.
When a WebSocket session is created, a handler lambda will be called with WebSocket session instance on receiver. Once handler function returns, the WebSocket connection will be terminated immediately. For RAW WebSocket it is important to perform close sequence properly.
Bind RAW WebSocket at the current route optionally checking for the WebSocket protocol (ignored if null
) Requires WebSockets plugin to be installed.
Unlike regular (default) webSocket, a raw WebSocket is not handling any ping/pongs, timeouts or close frames. So WebSocketSession's incoming channel will contain all low-level control frames and all fragmented frames need to be reassembled.
When a WebSocket session is created, a handler lambda will be called with WebSocket session instance on receiver. Once handler function returns, the WebSocket connection will be terminated immediately. For RAW WebSocket it is important to perform close sequence properly.
Parameters
indicates if the server should negotiate installed WebSocket extensions.
Deprecated (with error)
Use webSocketRaw(protocol = protocol, handler = handler) instead.
Replace with
webSocketRaw(protocol = webSocketProtocol, handler = webSocketHandler)
Bind RAW WebSocket at the current route optionally checking for the WebSocket protocol (ignored if null
) Requires WebSockets plugin to be installed.
Unlike regular (default) webSocket, a raw websocket is not handling any ping/pongs, timeouts or close frames. So WebSocketSession's incoming channel will contain all low-level control frames and all fragmented frames need to be reassembled.
When a websocket session is created, a handler lambda will be called with WebSocket session instance on receiver. Once handler function returns, the WebSocket connection will be terminated immediately. For RAW WebSocket it is important to perform close sequence properly.