socket.io-p2p icon indicating copy to clipboard operation
socket.io-p2p copied to clipboard

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

Open ghost opened this issue 9 years ago • 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!

ghost avatar Sep 04 '15 14:09 ghost

Vote for this one as well

PixelsCommander avatar Sep 07 '15 19:09 PixelsCommander

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

tomcartwrightuk avatar Sep 14 '15 10:09 tomcartwrightuk

:+1:

3mcd avatar Jan 12 '16 20:01 3mcd

:+1:

redgvin avatar Apr 23 '16 21:04 redgvin