/// <summary> /// Constructs an instance of the HttpServerConnectionManager class. /// </summary> /// <param name="iTransportContext">The transport context.</param> public HttpServerConnectionManager(ITransportContext iTransportContext) : base(iTransportContext) { this.Local = new HostInformation("_ghttp://" + iTransportContext.HostIdentifier, iTransportContext); this._releaseConnections_InspectPersistentConnections = new PersistentConnectionStorage.ProcessConnectionEventHandler(this.ReleaseConnections_InspectPersistentConnections); this._internal_TimerCallback_InspectPersistentConnections = new PersistentConnectionStorage.ProcessConnectionEventHandler(this.Internal_TimerCallback_InspectPersistentConnections); // calculate host renewing timespan // this._hostRenewingSpan = GenuineUtility.ConvertToMilliseconds(iTransportContext.IParameterProvider[GenuineParameter.ClosePersistentConnectionAfterInactivity]) + GenuineUtility.ConvertToMilliseconds(iTransportContext.IParameterProvider[GenuineParameter.MaxTimeSpanToReconnect]); this._internal_TimerCallback = new WaitCallback(Internal_TimerCallback); this._closeInvocationConnectionAfterInactivity = GenuineUtility.ConvertToMilliseconds(this.ITransportContext.IParameterProvider[GenuineParameter.CloseInvocationConnectionAfterInactivity]); TimerProvider.Attach(this); }
/// <summary> /// Constructs an instance of the TcpConnectionManager class. /// </summary> /// <param name="iTransportContext">The transport context.</param> public TcpConnectionManager(ITransportContext iTransportContext) : base(iTransportContext) { this._onEndSending = new AsyncCallback(this.LowLevel_EndSending); this._internal_TimerCallback = new WaitCallback(this.Internal_TimerCallback); this._HalfSync_onContinueReceiving = new WaitCallback(this.Pool_ContinueHalfSyncReceiving); this._HalfSync_onEndReceiving = new AsyncCallback(this.LowLevel_HalfSync_EndReceiving); this._lowLevel_Client_PreventDelayedAck = new WaitCallback(this.LowLevel_Client_PreventDelayedAck); this._processObjectLateBoundHandler = new PersistentConnectionStorage.ProcessConnectionEventHandler(this.FindExpiredConnections); this._releaseConnections_InspectPersistentConnections = new PersistentConnectionStorage.ProcessConnectionEventHandler(this.ReleaseConnections_InspectPersistentConnections); this._tcpReadRequestBeforeProcessing = (bool) iTransportContext.IParameterProvider[GenuineParameter.TcpReadRequestBeforeProcessing]; this.Local = new HostInformation("_gtcp://" + iTransportContext.HostIdentifier, iTransportContext); TimerProvider.Attach(this); }
/// <summary> /// Constructs an instance of the XHttpConnectionManager class. /// </summary> /// <param name="iTransportContext">The transport context.</param> public XHttpConnectionManager(ITransportContext iTransportContext) : base(iTransportContext) { this._HalfSync_Client_onEndReceiving = new AsyncCallback(this.LowLevel_HalfSync_Client_EndReceiving); this._HalfSync_Server_onEndReceiving = new AsyncCallback(this.LowLevel_HalfSync_Server_EndReceiving); this._AsyncSending_onEndSending = new AsyncCallback(this.LowLevel_OnEndAsyncSending); this._internal_TimerCallback = new WaitCallback(this.Internal_TimerCallback); this._HalfSync_Client_onContinueReceiving = new WaitCallback(this.Pool_Client_ContinueHalfSyncReceiving); this._HalfSync_Server_onContinueReceiving = new WaitCallback(this.Pool_Server_ContinueHalfSyncReceiving); this._releaseConnections_InspectPersistentConnections = new PersistentConnectionStorage.ProcessConnectionEventHandler(this.ReleaseConnections_InspectPersistentConnections); this._internal_TimerCallback_InspectPersistentConnections = new PersistentConnectionStorage.ProcessConnectionEventHandler(this.Internal_TimerCallback_InspectPersistentConnections); this.Local = new HostInformation("_ghttp://" + iTransportContext.HostIdentifier, iTransportContext); TimerProvider.Attach(this); _xHttpReadHeaderTimeout = GenuineUtility.ConvertToMilliseconds(iTransportContext.IParameterProvider[GenuineParameter.XHttpReadHttpMessageTimeout]); }