예제 #1
0
 internal void GetCounters(ConnectionCounters counters)
 {
     counters.OperationCount            = OperationCount;
     counters.SocketCount               = Interlocked.Read(ref socketCount);
     counters.WriterCount               = Interlocked.CompareExchange(ref activeWriters, 0, 0);
     counters.NonPreferredEndpointCount = Interlocked.Read(ref nonPreferredEndpointCount);
     completionManager.GetCounters(counters);
     physical?.GetCounters(counters);
 }
예제 #2
0
        internal void GetCounters(ConnectionCounters counters)
        {
            counters.PendingUnsentItems        = queue.Count();
            counters.OperationCount            = OperationCount;
            counters.SocketCount               = Interlocked.Read(ref socketCount);
            counters.WriterCount               = Interlocked.CompareExchange(ref activeWriters, 0, 0);
            counters.NonPreferredEndpointCount = Interlocked.Read(ref nonPreferredEndpointCount);
            completionManager.GetCounters(counters);
            var tmp = physical;

            if (tmp != null)
            {
                tmp.GetCounters(counters);
            }
        }