/// <summary> /// Called when a peer was discovered by broadcast. /// </summary> /// <param name="sender">The sender.</param> /// <param name="peerDiscoveryEventArgs">The <see cref="Intercom.Discovery.PeerDiscoveryEventArgs"/> instance containing the event data.</param> private void OnBroadcastPeerDiscovered(object sender, PeerDiscoveryEventArgs peerDiscoveryEventArgs) { var endpoint = peerDiscoveryEventArgs.Mailbox; var uuid = peerDiscoveryEventArgs.Uuid; var localInterface = peerDiscoveryEventArgs.Interface; RegisterPeer(endpoint, uuid, localInterface); }
/// <summary> /// Raises the <see cref="PeerDiscovered"/> event. /// </summary> /// <param name="e">The <see cref="Intercom.Discovery.PeerEventArgs"/> instance containing the event data.</param> private void OnPeerDiscovered(PeerDiscoveryEventArgs e) { var handler = PeerDiscovered; if (handler != null) { handler(this, e); } }