socketio/socket.io-p2p

[Question] Send a message to a single peer in a room

xFooly opened this issue · 4 comments

Hello,

is it possible to send data directly to a peer instead of broadcasting it to all peers in the room?

If I can give my opinion it would be great if there was an event like:

p2psocket.on('peer-connected', function(peer){
    //peer.emit('peer-msg', {msg:'Hello there!'})
})

or have access to all peers from within the p2psocket object. Right now I see that there is _peers attribute, but it isn't possible to send data with the emit method.

Thank you for the great library!

Vote for this one as well

This sounds useful. I will have a look at a solution.

3mcd commented

👍

👍