Thumbnail

Websocket Server

A WebSocket server for ARC that accepts client connections and executes scripts for each message received.

+ How To Add This Control To Your Project (Click to Expand)
  1. Make sure you have the latest version of ARC installed.
  2. Select the Get button in this page to download the archive file.
  3. Double click the downloaded archive file to execute installer.
  4. The installer will add this control to ARC.
  5. Load ARC and press the Project -> Add Control button from the menu.
  6. Choose the Communication category tab.
  7. Press the Websocket Server icon to add the control to your project.

Manual

A WebSocket server for ARC that accepts client connections and executes scripts for each message received. The received message contents will be stored in the respective variable.

User-inserted image


Configuration Menu


User-inserted image

1) The Response Variable will hold the text response message that is sent from the client.

2) Response Script will be executed for every response that is sent from the clients. Within this script, the response message is available in the Response Variable. By default, an example script will speak the response data.

3) The Connection Status Variable holds a true or false bool regarding the status of the server if listening.

4) Enable Debug will display the full response message in the log window. This will consume unnecessary CPU and memory in a production environment and is only for debugging. By default, this is checked.


Run As Administrator


*Note: Due to security restrictions in Windows, ARC will have to be run as administrator for this robot skill.

Optionally, Microsoft Windows can have the access control list altered to avoid the need to run as administrator. You may have to add URL ACLs, i.e. URL bindings, within the operating system using the netsh command:
- Check for existing bindings using: netsh http show urlacl
- Add a binding using: netsh http add urlacl url=http://[hostname]:[port]/ user=everyone listen=yes
(Where hostname and port are the values you are using in the constructor)

PRO
Synthiam
#1   — Edited
Bugfix when a message is received while ARC is closing