예제 #1
0
 /// <summary>
 /// 分析TrackerAddress
 /// </summary>
 private void buildTrackerAddresses()
 {
     foreach (var item in this.trackerList)
     {
         TrackerAddressHolder holder = new TrackerAddressHolder(item);
         trackerAddressCircular.Add(holder);
         trackerAddressMap.Add(item, holder);
     }
 }
예제 #2
0
        /// <summary>
        /// 获取配置地址列表
        /// </summary>
        /// <returns></returns>
        private string getTrackerAddressConfigString()
        {
            StringBuilder config = new StringBuilder();

            for (int i = 0; i < trackerAddressCircular.Count; i++)
            {
                TrackerAddressHolder holder  = trackerAddressCircular.Next();
                IPEndPoint           address = holder.GetAddress();
                config.Append(address.ToString()).Append(",");
            }
            return(config.ToString());
        }