0

I am bit confused. I have been looking websocket sometime now. Still there is a tiny confusion.

1) websocket anyhow uses TCP/IP underneath to transport the data to and from client and server. The format of the data could be 'binary' too.

Here are few examples I have victimed.

Streaming Binary with Node.js and WebSockets

Question:

Now, there are some tools like websockify ( https://github.com/kanaka/websockify ) , implemented websocket protocol itself, and does the binary transfer. How does this websockify differ from directly sending binary data after reading from TCP/IP server?.

Community
  • 1
  • 1
DrunkenMaster
  • 1,218
  • 3
  • 14
  • 28
  • Browsers do not give you access to TCP/IP socket. You **only** available choices are 1. ajax (xmlHttpRequest), 2. browser actions like form submission or img loading or script loading etc. 3. websockets. 1 and 2 cannot send binary data so your only option is websockets. – slebetman Oct 05 '16 at 07:06
  • @slebetman, Browsers do not direct TCP/IP socket - understood. so, even websocify also will be using websocket to transport binary data to clien right?. in that case, what is the uniqueness the websockify is doing that which can not be achieved as mentioned in the sample link http://stackoverflow.com/questions/15638096/streaming-binary-with-node-js-and-websockets – DrunkenMaster Oct 05 '16 at 07:14
  • One isn't. You can transfer anything you like with PUT. – user207421 Oct 05 '16 at 07:37
  • @EJP, can you kindly explain how websockify differs? – DrunkenMaster Oct 05 '16 at 07:40

0 Answers0