コード例 #1
0
        internal TCPHelper.TCP_ESTATS_BANDWIDTH_ROD_v0 EstimateBandwidth()
        {
            if (rawrow != null && !IsAccessDenied)
            {
                //var x = DateTime.Now.Ticks;

                return(rawrow is TCPHelper.MIB_TCPROW ? TCPHelper.GetTCPBandwidth((TCPHelper.MIB_TCPROW)rawrow) : TCP6Helper.GetTCPBandwidth((TCP6Helper.MIB_TCP6ROW)rawrow));
                //this.PointsOut.Add(new Point(x, ret.OutboundBandwidth));
                //this.PointsIn.Add(new Point(x, ret.InboundBandwidth));

                //return ret;
            }
            else
            {
                return(new TCPHelper.TCP_ESTATS_BANDWIDTH_ROD_v0 {
                    InboundBandwidth = 0, OutboundBandwidth = 0
                });
            }
        }