2

I need to create a raw TCP Socket connection from the client side (browser) in JavaScript. Is there any native (language supported) way of crating or working with TCP Sockets. I need the TCP Connection, not a WebSocket neither any HTTP backed solution.

John Saunders
  • 160,644
  • 26
  • 247
  • 397
ag.albachicar
  • 347
  • 1
  • 3
  • 17
  • 1
    I think that's what node.js is about, though the socket is not raw. http://nodejs.org/ – Jonathan M Jan 16 '15 at 17:05
  • No. Browsers only support ws and http/s. You will have to use a plugin written in flash or silverlight or alike to have more native access to be able to make TCP connection – makeitmorehuman Jan 16 '15 at 17:09
  • Not from within a browser. Client-side JavaScript can only use web-related standards like HTTP/Ajax and WebSockets. If you need raw TCP, you will need a server-side layer to create the TCP socket. – Jonathan Lonowski Jan 16 '15 at 17:09
  • But do check this library out: https://github.com/yankov/webtcp – makeitmorehuman Jan 16 '15 at 17:11
  • Unlike forum sites, we don't use "Thanks", or "Any help appreciated", or signatures on [so]. See "[Should 'Hi', 'thanks,' taglines, and salutations be removed from posts?](http://meta.stackexchange.com/questions/2950/should-hi-thanks-taglines-and-salutations-be-removed-from-posts). BTW, it's "Thanks in advance", not "Thanks in advanced". – John Saunders Jan 16 '15 at 17:26
  • 1
    i think chrome extensions might have this capability, but not vanilla JS. – dandavis Jan 16 '15 at 17:27
  • Thanks for the English class. – ag.albachicar Jan 16 '15 at 17:38

0 Answers0