Telemachus

Telemachus

14.7k Downloads

Websocket disconnects on any command

hudsonfoo opened this issue · 4 comments

commented

Telemachus 1.5, KSP v1.1.3.1289, Mac OS X 10.11.6

I set up a basic ship with the Telemachus antenna attached. I can hit the HTTP API without any issue, but when connecting to the Websocket API, I am immediately disconnected after sending any command whatsoever.

Output from the console using wscat for clarity but my tests in the browser net exactly the same result:

➜  ✗ wscat -c ws://127.0.0.1:8085/datalink
connected (press CTRL+C to quit)
> {"+":"v.altitude"}
disconnected
➜  ✗ wscat -c ws://127.0.0.1:8085/datalink
connected (press CTRL+C to quit)
> {"rate":1000}
disconnected
➜  ✗ wscat -c ws://127.0.0.1:8085/datalink
connected (press CTRL+C to quit)
> {}
disconnected
commented

I'm seeing this same issue as of yesterday with a Node.js test program using the ws module, but I was able to successfully talk to /datalink using telsocket. Was gong to try to dig around today with some traffic dumps and see if I can spot what's different.

commented

i really need Web sockets for a project i am working on

commented

same issue

commented

I know this is old, but you can fix it by removing all the whitespaces from the json string