Esempio n. 1
0
        private static void AddServer(Server server)
        {
            if (server == null || string.IsNullOrEmpty(server.Name) || Pools.Contains(server.Name))
            {
                return;
            }
            var pool = new SockIOPool();

            pool.SetServers(server.Address.Split(','));
            pool.InitConnections      = server.MinConnections;
            pool.MinConnections       = server.MinConnections;
            pool.MaxConnections       = server.MaxConnections;
            pool.SocketConnectTimeout = server.ConnectionTimeOut;
            pool.SocketTimeout        = server.SocketTimeOut;
            pool.MaintenanceSleep     = 30;
            pool.Failover             = true;
            pool.Nagle = false;
            pool.Initialize();
            Pools[server.Name] = pool;
        }
Esempio n. 2
0
 private static void AddServer(Server server)
 {
     if (server == null || string.IsNullOrEmpty(server.Name) || Pools.Contains(server.Name))
         return;
     var pool = new SockIOPool();
     pool.SetServers(server.Address.Split(','));
     pool.InitConnections = server.MinConnections;
     pool.MinConnections = server.MinConnections;
     pool.MaxConnections = server.MaxConnections;
     pool.SocketConnectTimeout = server.ConnectionTimeOut;
     pool.SocketTimeout = server.SocketTimeOut;
     pool.MaintenanceSleep = 30;
     pool.Failover = true;
     pool.Nagle = false;
     pool.Initialize();
     Pools[server.Name] = pool;
 }