Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

Websocket disconnects on any command #74

Open
hudsonfoo opened this issue Aug 27, 2016 · 4 comments
Open

Websocket disconnects on any command #74

hudsonfoo opened this issue Aug 27, 2016 · 4 comments

Comments

@hudsonfoo
Copy link

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
hudsonfoo pushed a commit to hudsonfoo/openmct that referenced this issue Aug 27, 2016
Resolves issue nasa#1064. Used example code from Telemetry tutorial and
converted for use by Kerbal Space Program's Telemachus plugin.

Note that websockets in Telemachus are non-operational (see
KSP-Telemachus/Telemachus#74). The HTTP
API was used instead, polling every second.
@ghost
Copy link

ghost commented Sep 24, 2016

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.

@rocketstrong600
Copy link

same issue

@rocketstrong600
Copy link

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

@chistian95
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants