private Pool(ClientConfigurationElement config) { this.config = config; //初始化连接池 for (var i = 0; i < config.SocketPool.MinPoolSize; i++) { Create(); } }
private static Pool Init(ClientConfigurationElement config) { string key = config.GetHashCode().ToString(); if (!pools.ContainsKey(key)) { var p = new Pool(config); pools[key] = p; } return(pools[key]); }