Beispiel #1
0
 public Heartbeat(IHeartbeatHandler[] callbacks, ISystemClock systemClock, IDebugger debugger, KestrelTrace trace)
 {
     _callbacks   = callbacks;
     _systemClock = systemClock;
     _debugger    = debugger;
     _trace       = trace;
     _interval    = Interval;
     _timerThread = new Thread(state => ((Heartbeat)state !).TimerLoop())
     {
         Name         = "Kestrel Timer",
         IsBackground = true
     };
 }
Beispiel #2
0
 public KestrelConnection(long id,
                          ServiceContext serviceContext,
                          TransportConnectionManager transportConnectionManager,
                          Func <T, Task> connectionDelegate,
                          T connectionContext,
                          KestrelTrace logger)
     : base(id, serviceContext, transportConnectionManager, logger)
 {
     _connectionDelegate  = connectionDelegate;
     _transportConnection = connectionContext;
     connectionContext.Features.Set <IConnectionHeartbeatFeature>(this);
     connectionContext.Features.Set <IConnectionCompleteFeature>(this);
     connectionContext.Features.Set <IConnectionLifetimeNotificationFeature>(this);
 }
Beispiel #3
0
 public ConnectionManager(KestrelTrace trace, ResourceCounter upgradedConnections)
 {
     UpgradedConnectionCount = upgradedConnections;
     _trace = trace;
 }
Beispiel #4
0
 public ConnectionManager(KestrelTrace trace, long?upgradedConnectionLimit)
     : this(trace, GetCounter(upgradedConnectionLimit))
 {
 }