Changes

Jump to navigation Jump to search
17 bytes added ,  13:51, 4 August 2018
no edit summary
This [[Module Library|XQuery Module]] contains functions for accessing specific WebSocket-Functions functions and setting Attributes attributes on a WebSocket-Connectionconnection. This module is mainly useful in the context of [[WebSockets]].
=Conventions=
* All functions and errors are assigned to the <code><nowiki>http://basex.org/modules/websocket</nowiki></code> namespace. The module must be imported in the query prolog:
<pre class="brush:xquery">
import module namespace session websocket = "http://basex.org/modules/websocket";
...
</pre>
|-
| '''Summary'''
|Broadcasts <code>message</code> which may be of type xs:string, xs:base64Binary, or xs:hexBinary to all connected Members exept members except to the caller.
|}
|-
| '''Summary'''
|Returns the ID of the current Websocket ConnetionWebSocket connection.
|}
|-
| '''Summary'''
|Returns the Websocket Attribute WebSocket attribute with the key <code>$key</code>. If the <code>$id</code> Parameter parameter is set, it returns the Attribute attribute of a Specific specific User with the ID <code>$id</code>
|}
|-
| '''Summary'''
|Sets a Websocket Attribute WebSocket attribute with the key <code>$key</code> and the value <code>$value</code>. If the <code>$id</code> Parameter parameter is set, the Attribute attribute of a specific User user with the ID <code>$id</code> is set.
|}
|-
| '''Summary'''
|Removes a Session Attribute session attribute from the current WebsocketClientWebSocketClient. If the <code>$id</code> Parameter parameter is set, the Attribute attribute of a specific User user with the ID <code>$id</code> will be deleted.
|}
|-
| '''Summary'''
|Returns the Path path of the current WebsocketClientWebSocketClient. If the <code>$id</code> Parameter parameter is set, the Path path of a specific User user with the ID <code>$id</code> will be returned.
|}
administrator, editor
23

edits

Navigation menu