Jump to content
Sign in to follow this  
JimKueneman

TCP connection.

Recommended Posts

Ok I have it working with a WebSocket server in Lazarus.... sort of.  If I run it through SMS it works great.  If I launch the Edge Browser it has a socket error and socket closed message....  

I am sure it is something I don't understand about Javascript in general.  What do I need to make it work in the browser?

Jim

Note: It does work if I run it though PhoneGap on my iPhone.  I am assuming the PhoneGap server has something to do with it?

Share this post


Link to post
Share on other sites

Depends on what you are talking about: web html5 or node.js?
Node (server) can create just about anything, but websocket is the best solution in my view.
So from the browsers perspective: yes, websocket is the only bi-directional communication that is allowed.

Websocket also works well as a general tech. It is low latency, handles caching elegantly and nice - and with socket.io you can register keywords and essentially build a protocol very quickly. We had a case where a server written in Delphi using Indy with raw TCP connections actually went down and was unstable over a 3G based network.
I introduced a small and efficient WebSocket node.js server for them and the server went from handling 30-50 activities a second to a steady 500.
Using a normal node.js cluster like PM2 you can easily handle high volume. NetFlix is written in pure node.js for example, and the push some terabyte a second around the globe :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×