-1

I'm trying to understand the concepts of socket.io and websockets.

Suppose you have many users connected in a channel over socket.io, can two (peers) of them start a private conversation (with video for example) without passing their data through socket.io server?

For instanace, browser to browser with websocket.

I am asking because I need to let the data (audio video) flow from browser to browser between two users so the server will not be saturated with data of users starting private conversation.

If it is possible, what data needs to be exchanged to make this happen?

Engineer2021
  • 3,288
  • 6
  • 29
  • 51

1 Answers1

1

You should read this answer, how to make a browser to browser connection.

https://stackoverflow.com/a/7933140/3375010

Actually, it's not possible to initiate a p2p communication with socket.io. But WebRTC allows that, it supports browser to browser applications for voice, video, file sharing...

Community
  • 1
  • 1
p.o
  • 71
  • 2
  • So, is it possible to do peer to peer communication and avoid data transfert through server, i mean the data don't go to server. if so can you give an example how to connect two peers. just by ips and browser details ? – user3620693 Jul 14 '14 at 16:22
  • Yes it is possible, but not with socket.io. Some articles on the link show how to do that. – p.o Jul 14 '14 at 16:24
  • But without socket.io, how to discover the two peers that needs to communicate ? – user3620693 Jul 14 '14 at 17:36