×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

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
11 years 1 month 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: 11 years 1 month ago by Peter Polakovic.
11 years 1 month 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
11 years 1 month 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.
11 years 1 month 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...
11 years 1 month ago #27

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

Time to create page: 0.418 seconds