uce/site/doc/pages/ws_scope.txt
2026-06-15 12:00:46 +00:00

21 lines
762 B
Plaintext

:sig
String ws_scope()
:params
return value : scope identifier of the current WebSocket endpoint
:see
>websocket
:content
Returns the runtime's scope identifier for the current WebSocket endpoint.
This is the same default scope used by `ws_send()`, `ws_connections()`, and `ws_connection_count()` when no explicit scope is supplied.
In the current runtime implementation this scope is the page's internal endpoint identifier, typically the absolute `SCRIPT_FILENAME` of the `.uce` file that accepted the WebSocket upgrade.
Related:
- PHP: WebSocket connection metadata and send APIs in Ratchet, Workerman, or similar server frameworks
- JavaScript / Node.js: browser `WebSocket` properties and Node `ws` server-side connection inspection and send methods