Client to Client communication?


#1

Hi,

Is there a way for me to do client to client communication without using the server?

Thanks.


#2

You can use PeerJS, which implements the WebRTC protocol, you can exchange any type of data between your client in a P2P way. But you’ll need a server that will act as a broker so the client will know each others.

Take a look at this app : https://github.com/yanisIk/P2PChat
It is a chat application built with Meteor and using PeerJS to exchange messages.


#3

Keep in mind that WebRTC currently only works in Firefox and Chrome: http://caniuse.com/#search=webrtc.

Another solution is to use a service such as PubNub or Pusher. It’s still technically going through servers, but at least not going through yours.


#4

Thank you very much! I will take a look at both or your options.