Example #1
0
        internal void ReceivedMeshNetworkPeersViaTcpRelay(Connection viaConnection, BinaryNumber channelId, List <EndPoint> peerEPs)
        {
            MeshNetwork foundNetwork = null;

            lock (_networks)
            {
                foreach (KeyValuePair <BinaryNumber, MeshNetwork> network in _networks)
                {
                    if (network.Key.Equals(channelId) || ((network.Value.Type == MeshNetworkType.Private) && network.Value.OtherPeer.MaskedPeerUserId.Equals(channelId)))
                    {
                        foundNetwork = network.Value;
                        break;
                    }
                }
            }

            if (foundNetwork != null)
            {
                foundNetwork.TcpRelayClientReceivedPeers(viaConnection, peerEPs);
            }
        }