コード例 #1
0
ファイル: SSUHost.cs プロジェクト: glasgowdev/i2p-cs
        internal void IntroductionRelayOffered(IntroducerInfo intro)
        {
            if (!RouterContext.Inst.IsFirewalled)
            {
                if (CurrentIntroducers.Count() == 0)
                {
                    MyRouterContext.NoIntroducers();
                }
                return;
            }

            if (CurrentIntroducers.Count() >= 3)
            {
                return;
            }

            CurrentIntroducers.Set(intro.Host, intro);
            MyRouterContext.SetIntroducers(CurrentIntroducers.Select(i => i.Value));
        }
コード例 #2
0
        internal void IntroductionRelayOffered(IntroducerInfo intro)
        {
            if (!RouterContext.Inst.IsFirewalled)
            {
                if (!CurrentIntroducers.Any())
                {
                    MyRouterContext.NoIntroducers();
                }
                return;
            }

            if (CurrentIntroducers.Count() >= 5)
            {
                return;
            }

            Logging.LogTransport($"SSU Introduction: Added introducer {intro.Host}, {intro.IntroKey}, {intro.IntroTag}, {intro.EndPoint}");
            CurrentIntroducers.Set(intro.Host, intro);
            MyRouterContext.SetIntroducers(CurrentIntroducers.Select(i => i.Value));
        }