0

So we have Websockets: var socket = new WebSocket("ws://some/", ["soap", "wamp"]

WebSockets are made for lowlatency connect and sending and recieving messages, but why we cant use simple sockets in web, like var socket = new Socket("tcp://some:6413") and cant do magic like socket.sendByte(0xFF) socket.readByte() and etc.

It would discover much more opportunities for using it for extra-lowlatency, for sharing images, videos, online HTML5 games for fun..

I know what Flash/Unity/Java can do this, but why JS and HTML5 still didn't do this ? Or did they?

  • I think that historicly, JS was invented for simple DOM manipulations, and nothing more. even AJAX is a subsitution for creating an IFrame and reading it's data. I think that in a frontend sense, many front end developer will find socket API very low-level and un-needed. needless to say, in Node.js you got everything, but the browser world is different – David Haim Sep 16 '15 at 13:04
  • 3
    more or less answered here : http://stackoverflow.com/questions/8051516/how-to-establish-a-tcp-socket-connection-from-a-web-browser-client-side – Hacketo Sep 16 '15 at 13:05
  • 2011, its about 4 years past.. And there is no any plans for doing it native ? – Alexander Shcheglakov Sep 16 '15 at 13:11

0 Answers0