Unable to connect WebSocket API hosted on Socket.IO - ios

I am trying to connect to WebSocket API : http://kaboom.rksv.net/ using Socket.IO framework for iOS, i am banging my head to understand how to open the connection with this.
I have tried many possibilities and it did not work. Any help would be greatly appreciated.

If the server talks the WebSocket protocol, you have to use a WebSocket client library. On the other hand, if the server talks the Socket.IO protocol, you have to use a Socket.IO client library. Below is an excerpt from Socket.IO page in Wikipedia.
Socket.IO is not a WebSocket library with fallback options to other realtime protocols. It is a custom realtime transport protocol implementation on top of other realtime protocols. Its protocol negotiation parts cause a client supporting standard WebSocket to not being able to contact a Socket.IO server. And a Socket.IO implementing client cannot talk to a non-Socket.IO based WebSocket or Long Polling Comet server. Therefore Socket.IO requires using the Socket.IO libraries on both client and server side.

Related

Communication between a http server and https server will be secured?

I am trying to implement an HTTP server inside an iOS app. I could see similar apps in the app store. But in my case, embedded HTTP server has to communicate with external HTTPS Server. So now,
is the communication secured? Or do I need to implement HTTPS server, instead?
Is it possible to implement an HTTPS server in iOS app?
Will Apple reject this approach?
Thanks in Advance
I'm assuming that you use the internal HTTP server to provide interceped content for a WKWebView. I this case you web view connects to the HTTP server over HTTP and this connection is insecure. But generally this shouldn't be an issue because nobody can intercept the connection. You HTTP server connects to the internet over HTTPS, and this should be done because this connection could be compromised.
Don't be confused about the different protocols. If you call a HTTPS-URL NSURLSession will use HTTPS and use a secured connection. There is no pitfall or issue. You needn't to support HTTPS for the web view to server connection. This will give you not more notable security.
I use a similar setup in my application and it works perfectly.
BTW: In iOS 11 you may use WKURLSchemeHandler to intercept web view requests. This should be much easier than a local HTTP server. The disadvantage is, that you have to define a custom protocol (e.g. xhttp instead of http), and rewrite the URLs in the web content. But this should be much easier to achieve than a local HTTP server.

Socket.io Server in Delphi XE5

Im looking for sample source code, component for Socket.io Server implementation. I'm using SgcWebsockets (http://websockets.esegece.com/) works fine like socket.io client, they don't provide socket.io component, there is some solution or aproach..
Im supporting Web app (AngularJS) that use nodejs has main socket.io server in the cloud, but when something goes wrong the web app redirect the traffic to the local app server builded in Dephi, the http server indy, websocket-Socket.io client component works fine, but now we need also implement the socket.io server locally.
My websockets library has support for socket.io:
https://github.com/andremussche/DelphiWebsockets

How to authenticate client on erlang cowboy websocket?

We have used Erlang/Cowboy to develop a simple chatting service based on WebSockets. Right now, We are using localhost:8080 to connect server.
I want to do user authentication, that will be done based on the URL parameter, and it will return user id or none for the connection.
How to do that?
Before the websocket exchange, you can ask a token to your application and use it with your websocket client.

How to implement websocket-based push service through Rails?

I'm building a messaging app like WhatsApp. My goal is to expose only REST API through Rails and "push notifications" to connected clients via websockets. So clients communicate with server only with the REST API. Only the server sends data through the websocket. Clients can only receive data from it.
Currently I've built an eventmachine server listening for websocket connections and Unix domain socket connections. When a client performs a request on the REST API, Rails connects to the Unix domain socket to tell the eventmachine what connected client needs to be notified through the websocket.
My concern is about how it will behave in production (my server runs Apache Passenger). So I'm looking for some project to solve my problem. I had a look at Faye but I can't understand how to force it to send notifications to connected clients from an external process (that might be rails while is performing a request). Any ideas?
Have you looked at the sync gem I am doing something similar and that is what i use
https://github.com/chrismccord/sync
They have a really good video on integration and a example https://github.com/chrismccord/sync_example
and this fully supports Faye and Pusher.
I use Faye for dev and Pusher for production

Does dart support client SSL/TLS connections yet?

I am thinking of writing an Apple Push Notification server using Dart. Does Dart support client side SSL/TLS certificates?
Yes! Dart VM now supports SSL/TLS, and HTTPS.
See http://code.google.com/p/dart/issues/detail?id=3950 and http://code.google.com/p/dart/issues/detail?id=3593 which are now closed. :)
Dart supports SSL/TLS client connections using SecureSocket. It also supports secure server sockets using SecureServerSocket to (use this if you need to listen on a secure port on the VM).
Note that the ordinary HttpClient will automatically handle HTTPS for your browser connections so no extra code is needed in these cases.

Resources