コード例 #1
0
 public HttpClusterApi AddHost(string url, params string[] host)
 {
     if (url == "*")
     {
         if (host != null)
         {
             foreach (string item in host)
             {
                 DefaultNode.Add(item);
             }
         }
     }
     else
     {
         if (host != null)
         {
             url = url.ToLower();
             IHttpNode node = GetNode(url);
             if (node == null)
             {
                 node        = new HttpNode();
                 mNodes[url] = node;
             }
             foreach (string item in host)
             {
                 node.Add(item);
             }
         }
     }
     return(this);
 }
コード例 #2
0
 public HttpClusterApi()
 {
     DefaultNode     = new HttpNode();
     DetectionTime   = 5000;
     mDetectionTimer = new System.Threading.Timer(OnVerifyClients, null, DetectionTime, DetectionTime);
 }