Socket.io & Kinoma

Is it possible to use to have a Kinoma app communicate with a socket.io server using websockets? In the websocket example the app is calling a ws:// url. I can't find an example of an app making a http:// call and then upgrading the request to a websocket one. Is this possible?

Answers

  • Answer ✓

    Daniel,

    The WebSocket client does go through the standard HTTP protocol handshake, even with ws:// urls. In many cases, you will be able to connect to the server using a ws:// prefix instead of http:// with your server's url.

    If this doesn't work for you, please post back here. Any details of the failure you can pull from your server's logs will be useful in exploring the issue.

    Cheers,

    Will

  • edited December 2015

    I think the issue was more related to the protocol that socket.io uses for handshake and authentication. I decided to implement a standard WebSocket API on my server in addition to the socket.io on for the kinoma app.

    As a suggestion, it would be good to make a Kinoma API for socket.io. This is a very popular websocket communication library that simplifies things a lot. They have a C++ implementation (http://socket.io/blog/socket-io-cpp/) and it would be really helpful for the community if that was made part of KPR. thoughts?

  • Hi Daniel, were you able to eventually connect using socket.io?

Sign In or Register to comment.