/// <summary> /// Gets the server client. /// </summary> /// <param name="host">The host.</param> /// <returns></returns> public static SharedCacheTcpClient GetServerClient(string host) { #region Access Log #if TRACE { Handler.LogHandler.Tracking("Access Method: " + typeof(ManageServerTcpSocketConnectionPoolFactory).FullName + "->" + ((object)MethodBase.GetCurrentMethod()).ToString() + " ;"); } #endif #endregion Access Log if (instanceServer == null) { // true / false indicates if connection pool needs to read from client or server config // true = client // false = server instanceServer = new ManageTcpSocketConnectionPool(false); } return(instanceServer.GetSocketFromPool(host)); }
/// <summary> /// Gets the client from the pool based on the host /// </summary> /// <param name="host">The host.</param> /// <returns></returns> public static SharedCacheTcpClient GetClient(string host) { #region Access Log #if TRACE { Handler.LogHandler.Tracking("Access Method: " + typeof(ManageClientTcpSocketConnectionPoolFactory).FullName + "->" + ((object)MethodBase.GetCurrentMethod()).ToString() + " ;"); } #endif #endregion Access Log if (instance == null) { // true / false indicates if connection pool needs to read from client or server config // true = client // false = server instance = new ManageTcpSocketConnectionPool(true); } return instance.GetSocketFromPool(host); }