uce/site/doc/pages/ws_close.txt
2026-06-16 12:21:31 +00:00

18 lines
529 B
Plaintext

:sig
bool ws_close(String connection_id = "")
:params
connection_id : optional target client ID, defaults to the current WebSocket client
return value : true if the target connection exists and was scheduled to close
:see
>websocket
:content
Queues a WebSocket close frame and closes the targeted connection.
If `connection_id` is omitted, the current connection handled by `WS(Request& context)` is closed.
:example
print("ws_close is resource-bound; configure the service or connection, then call it in request code.\n");