Changes

Jump to navigation Jump to search
884 bytes added ,  13:46, 22 October 2018
|}
=TippsWriting Applications=
* The [[WebSocket Module]] contains functions for interacting with other clients or manage specific clients.For example, you can store and access client-specific properties for a WebSocket connection or close the connection of clients. * The Note that one WebSocket connection can be opened per browser tab. In contrast, only one HTTP session exists for multiple tabs in in a browser. If you want to keep client-specific data on the web server, you can either store them in HTTP sessions or in the WebSocket connection. Note further that the results of functions annotated with <code>%ws:close</code> or <code>%ws:error</code> will not be transmitted to the client.Both annotations have rather been designed to gracefully close connections, write log data, remove clients from session data, etc. * For keeping the connection alive it is recommendable to use heart-beats, and send regular pings to the server.There is no ideal timespan for sending pings: It should not be sent too often, but you should also consider possible network latencies. * Use If your HTTP connection is secure, you should use the <code>wss</code> instead of the <code>ws</code> for scheme. If you get the <code>[basex:ws] WebSocket connection required</code> error, you may be attempting to call WebSocket functions from a secure non-WebSocket connectioncontext.* If you use a proxy server, check in the configuration if WebSockets are enabled.
=Example=
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu