Socket.io Server in Delphi XE5 - delphi

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

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.

Unable to connect WebSocket API hosted on Socket.IO

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.

What approach to be used on application side in migrating web services to HTTPS from HTTP?

i have an app running on Apple app store with webservices from HTTP Server but now i want to migrate my webservices from HTTP Server to newly brought HTTPS Server. What is the best approach to achieve this without affecting older application users running application on HTTP Server?
P.S: After migrating to new server, older server will not work.
Edit: my older server domain is going to expire and also i have amazon server on which i am going to move my webservices. So the older and new server link are different.
Thanks

Web Server and App Server

I just want to know that how the web server call to app server code and pass the response to the client, Eg :-
Nginx web serve
Unicorn app server
Rails application
Our request sends to web server and how web server(nginx) pass that request to the app server(unicorn) and how app server runs the rails code or route and sends back the response.
To understand the collaboration of a web server to an app server you must study the architecture of the server first. I guess this link will give you a good idea about architecture and it's bonding.
Have a look here:

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

Resources