Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Companion Websocket -- Sending data through to Local Server

Hi,

 

I have a local server running on my android device. 

I attempted to open a websocket to the address (FTP) within companion/index.js

 

Anders10100_0-1650411216636.png

And I get this error: 

Anders10100_1-1650411237789.png

 

Has anyone had any luck at all opening a WebSocket to Localhost to send data?

Best Answer
4 REPLIES 4

Answering my own question...

This works with "wss:" in front of what you are trying to connect to. It labels it as "WebSocket Secure", I believe.

 

Something like this...

ex: websocket = new WebSocket("wss://0.0.0.0:2221");

Best Answer
0 Votes

You need to use one of the allowed insecure IP addresses.

Peter McLennan
Gondwana Software
Best Answer
0 Votes

I think you mean protocols? Have you been able to use anything but "wss"? Working with the 6.0 version sdk It won't even allow wss it seems

Best Answer

There may be two issues here. If you're using a secure connection (wss or https), you'll need a non-self-signed SSL certificate associated with your server.

If you're not using a secure connection, you'll need to use one of a small number of allowed IP addresses (and I don't think that 0.0.0.0 is one of them).

Peter McLennan
Gondwana Software
Best Answer
0 Votes