Network Web Socket

Allows the communication between Usine and a Web Browser, for example to send commands to Usine from a web page.

Only one Web Socket module is allowed on a computer.



Web Socket port, should be 80 except in specials configurations.

string to send

String to send to the connected Web page.


Precess the send operation.

received string

String received from the Wed page.


Sends a trigger when a string is received.

response file

Optional, file sent as a response of the Web Socket. Can be an html, php, js, etc. For example you can create a script to communicate with Usine, like the file index.html:

        <title>WebSocket demo</title>
        <script type="text/javascript">
        var ws;
        function log(s) 
            document.getElementById("log").innerHTML += s + "\n";
        function sendMessage(s) 
            log(">> " + s);
        function send() 
        function init() 
            ws = new WebSocket("ws://"); // should be the IP address of Usine
            ws.onopen = function() 
                log("WebSocket opened");
                sendMessage("Hello ?");
            ws.onclose = function() 
                log("WebSocket closed")
            ws.onmessage = function(e) 
                log("<< " +
    <body onLoad="init()">
        <input type="text" id="text"> 
        <button onclick="send()">Send</button>
        <pre id="log"></pre>

See webSocketExample.html.

This file is optional because it can be stored on the distant server.

trace received msg

Display all received messages in the trace-panel.

test local host

Opens the local Web Browser in order to test the communication and the response file.

See also

version 4.0.200403

Edit All Pages