sourcey / libsourcey

C++14 evented IO libraries for high performance networking and media based applications
https://sourcey.com/libsourcey
GNU Lesser General Public License v2.1
1.31k stars 347 forks source link

Avoid Addition of Peer on "Signaler::onPeerConnected" , other than direct connection. #248

Open traw opened 6 years ago

traw commented 6 years ago

Method Signaler::onPeerConnected, receives event when new peer is added. How can we avoid peer add event if peer is not which was requested by _client.connect();. For example: there is one server S and two client C1 and C2. When C1 make connection with S. It receive event of connection with S and C2 in Signaler::onPeerConnected method. My question is, how to filter out C2 connection event in Signaler::onPeerConnected?