I'm wondering if there is some way to connect to and communicate with a traditional socket from the browser utilizing Javascript, the code being able to run on all devices including smartphones.
1 Answer
Nope.
Raw TCP/IP isn't accessible using the browser's Javascript engine.
Websockets and WebRTC are the two technologies that will get you as close to TCP/IP as you can get (but they are distinctly not raw TCP/IP).
On some non-browser engines (i.e. node.js), you could get raw TCP/IP functionality.