Esempio n. 1
0
 /// <summary>
 /// 告诉代理池,该ip已超时。
 /// </summary>
 public void VpnTimeout(IpPort ipPort)
 {
     lock (typeof(UseProxyIp))
         foreach (UseProxyIp useProxyIp in _useProxyIpList)
         {
             if (useProxyIp.VpnTimeout(ipPort))
             {
                 break;
             }
         }
 }
Esempio n. 2
0
 /// <summary>
 /// 将代理设置为超时
 /// </summary>
 /// <param name="ipPort"></param>
 public bool VpnTimeout(IpPort ipPort)
 {
     lock (typeof(UseProxyIp))
         for (int i = 0, len = IpProxyCacheList.Count; i < len; i++)
         {
             if (IpProxyCacheList[i] == ipPort.Ip && _portProxyCacheList[i] == ipPort.Port)
             {
                 _limitDateCacheList[i] = _limitDateCacheList[i].Value.AddDays(-1);
                 return(true);
             }
         }
     return(false);
 }