websocketserver()

Creates a WebSocket Endpoint on the servlet container and registers a Listener Component with it.

Requires Extension: Lucee WebSockets Extension

websocketserver( endpoint=string, listener=any );

Returns: any

Argument Description
endpoint
string, required

The WebSocket's endpoint path, e.g. "/ws/echo" or "/chat/{channel}"

listener
any, required

A Component whose event handler methods will be called to handle Websocket events, like onHandshake(), onOpen(), onMessage(), onClose(), and onError()

Examples

There are currently no examples for this function 21,128ms WARN No examples for function websocketserver

See also