Changes

Jump to navigation Jump to search
178 bytes added ,  14:15, 22 October 2018
==%ws:connect(path)==
Called directly after a successful WebSocket handshake. The <code>path</code> specifies the path which a client is connected to.: <pre class="brush:xquery">declare %ws:connect('/') function local:connect() { };</pre>
You can specify here how to handle your users, e. g. save a name as a WebSocket attribute. Furthermore, you can check header parameters for validity.
==%ws:close(path)==
Called when the WebSocket closes. The <code>path</code> specifies the path which a client is connected to.: <pre class="brush:xquery">declare %ws:close('/') function local:connect() { };</pre>
The WebSocket is already closed when this annotation is called so there can be no return.
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu