WebSocket (Socket function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
 
Line 11: Line 11:
</table>
</table>
==Usage notes==
==Usage notes==
This function will upgrade a Janus Web thread to use the WebSocket protocol for simple two-way data transfer between the http client and the server.
The Janus Web request must contain the required http headers to allow the upgrade to occur.
This function must be called from a Janus Web Server SOUL program. The Janus Web port must be enabled for Web Socket upgrades with the WEBSOCKET parameter. The WEBSOCKET option can be specified on either the port definition or the JANUS WEB rule for the URL.
Any other usage will result in request cancellation.
==Examples==
==Examples==
==See also==
==See also==
{{Template:Socket:WebSocket footer}}
{{Template:Socket:WebSocket footer}}

Revision as of 15:01, 13 August 2019

Convert Web thread to WebSocket thread (Socket class)

[Introduced in Model 204 7.8 βeta]


This page is under construction.

Syntax

%socket = [%(Socket):]WebSocket

Syntax terms

%outSocketSocket object
[%(Socket):] The optional class name in parentheses denotes a virtual constructor. See "Usage notes", below, for more information about invoking a virtual constructor.

Usage notes

This function will upgrade a Janus Web thread to use the WebSocket protocol for simple two-way data transfer between the http client and the server.

The Janus Web request must contain the required http headers to allow the upgrade to occur.

This function must be called from a Janus Web Server SOUL program. The Janus Web port must be enabled for Web Socket upgrades with the WEBSOCKET parameter. The WEBSOCKET option can be specified on either the port definition or the JANUS WEB rule for the URL.

Any other usage will result in request cancellation.

Examples

See also