socketio / socket.io-p2p

MIT License
1.03k stars 179 forks source link

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

Open ghost opened 9 years ago

ghost commented 9 years ago

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!

PixelsCommander commented 9 years ago

Vote for this one as well

tomcartwrightuk commented 9 years ago

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

3mcd commented 8 years ago

:+1:

redgvin commented 8 years ago

:+1: