WebSocket (Socket function)
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
%outSocket | Socket 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.
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.