:title
WS

:sig
function WS()

:content
`WS` defines the WebSocket message handler.

The handler binds `request` implicitly as a `dval`. Read the message from `request.body`. Read connection data from `request.websocket`.

Use `ws_send`, `ws_send_to`, or `ws_close` to affect the connection.

:example capy ws
ws_send("echo: " + string(request.body), false)

:see-group
handlers

:see
type/request
