×

INDI Library v1.9.7 Released (29 Jul 2022)

Bi-monthly INDI Library released with new drivers and bug fixes.

HTML5 WebSocket

  • Posts: 10
  • Thank you received: 1

HTML5 WebSocket was created by Simon Holmbo

Hello,

Is it possible to use the HTML5 WebSocket to communicate with the indiserver?

I have tried with the example on this side and I can connect to the indiserver and it says there is a new arrival, but i don't think the client side knows because it never gets to the ws.onopen function.

/Simon
9 years 6 months ago #23

Please Log in or Create an account to join the conversation.

  • Posts: 712
  • Thank you received: 174

Replied by Peter Polakovic on topic HTML5 WebSocket

I don't believe it can work, WebSocket protocol is HTTP based while INDI server uses plain TCP streams.
Last edit: 9 years 6 months ago by Peter Polakovic.
9 years 6 months ago #24

Please Log in or Create an account to join the conversation.

  • Posts: 10
  • Thank you received: 1

Replied by Simon Holmbo on topic HTML5 WebSocket

Ahh, okay. Would it work if I made the indiserver complete the handshake?
I'm probably making a websocket in between, but I'm curious if it will work.

Thanks
9 years 6 months ago #25

Please Log in or Create an account to join the conversation.

  • Posts: 712
  • Thank you received: 174

Replied by Peter Polakovic on topic HTML5 WebSocket

I don't think so, you need some kind of middleware for making the handshake first and then to frame/unframe the data from/to raw TCP stream on INDI server side.
9 years 6 months ago #26

Please Log in or Create an account to join the conversation.

  • Posts: 10
  • Thank you received: 1

Replied by Simon Holmbo on topic HTML5 WebSocket

Okay. Thank you very much...
9 years 6 months ago #27

Please Log in or Create an account to join the conversation.

Time to create page: 0.361 seconds