Developer
WebSocket API
Connecting

Connecting

Connect to ws://localhost:42070/?client=<YourAppName>.

The client query parameter is required. It's the name XSOverlay uses to route responses back to you, so pick something unique to your app. Several connections can share a name; messages sent to that name go to all of them.

Port

The port is set by WebSocketPort in [XSOverlay install]/XSOverlay_Data/StreamingAssets/Plugins/Config/ExternalMessageAPIConfig.json.

Access levels

ConnectionCommands available
Desktop apps and scriptsAll commands
Web pages served from localhost or 127.0.0.1All commands
Web pages served from any other originSendNotification and RequestDeviceInformation only