UCE Docs / ws_scope

Signature

String ws_scope()

Parameters

return value : scope identifier of the current WebSocket endpoint

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.

Example

String scope = ws_scope();
print(scope == "" ? "(no WS scope in this context)" : scope, "\n");
Output
(no WS scope in this context)