Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / Net / System / Net / NetworkInformation / SystemTcpStatistics.cs / 1 / SystemTcpStatistics.cs
////// namespace System.Net.NetworkInformation { using System.Net.Sockets; using System; using System.ComponentModel; /// /// Provides support for ip configuation information and statistics. /// Tcp specific statistics. internal class SystemTcpStatistics:TcpStatistics { MibTcpStats stats; private SystemTcpStatistics(){} internal SystemTcpStatistics(AddressFamily family){ uint result; if (!ComNetOS.IsPostWin2K){ if (family!= AddressFamily.InterNetwork){ throw new PlatformNotSupportedException(SR.GetString(SR.WinXPRequired)); } result = UnsafeNetInfoNativeMethods.GetTcpStatistics(out stats); } else result = UnsafeNetInfoNativeMethods.GetTcpStatisticsEx(out stats, family); if (result != IpHelperErrors.Success) { throw new NetworkInformationException((int)result); } } public override long MinimumTransmissionTimeout{get {return stats.minimumRetransmissionTimeOut;}} public override long MaximumTransmissionTimeout{get {return stats.maximumRetransmissionTimeOut;}} public override long MaximumConnections{get {return stats.maximumConnections;}} public override long ConnectionsInitiated{get {return stats.activeOpens;}} public override long ConnectionsAccepted{get {return stats.passiveOpens;}}// is this true? We should check public override long FailedConnectionAttempts{get {return stats.failedConnectionAttempts;}} public override long ResetConnections{get {return stats.resetConnections;}} public override long CurrentConnections{get {return stats.currentConnections;}} public override long SegmentsReceived{get {return stats.segmentsReceived;}} public override long SegmentsSent{get {return stats.segmentsSent;}} public override long SegmentsResent{get {return stats.segmentsResent;}} public override long ErrorsReceived{get {return stats.errorsReceived;}} public override long ResetsSent{get {return stats.segmentsSentWithReset;}} public override long CumulativeConnections{get {return stats.cumulativeConnections;}} } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. ////// namespace System.Net.NetworkInformation { using System.Net.Sockets; using System; using System.ComponentModel; /// /// Provides support for ip configuation information and statistics. /// Tcp specific statistics. internal class SystemTcpStatistics:TcpStatistics { MibTcpStats stats; private SystemTcpStatistics(){} internal SystemTcpStatistics(AddressFamily family){ uint result; if (!ComNetOS.IsPostWin2K){ if (family!= AddressFamily.InterNetwork){ throw new PlatformNotSupportedException(SR.GetString(SR.WinXPRequired)); } result = UnsafeNetInfoNativeMethods.GetTcpStatistics(out stats); } else result = UnsafeNetInfoNativeMethods.GetTcpStatisticsEx(out stats, family); if (result != IpHelperErrors.Success) { throw new NetworkInformationException((int)result); } } public override long MinimumTransmissionTimeout{get {return stats.minimumRetransmissionTimeOut;}} public override long MaximumTransmissionTimeout{get {return stats.maximumRetransmissionTimeOut;}} public override long MaximumConnections{get {return stats.maximumConnections;}} public override long ConnectionsInitiated{get {return stats.activeOpens;}} public override long ConnectionsAccepted{get {return stats.passiveOpens;}}// is this true? We should check public override long FailedConnectionAttempts{get {return stats.failedConnectionAttempts;}} public override long ResetConnections{get {return stats.resetConnections;}} public override long CurrentConnections{get {return stats.currentConnections;}} public override long SegmentsReceived{get {return stats.segmentsReceived;}} public override long SegmentsSent{get {return stats.segmentsSent;}} public override long SegmentsResent{get {return stats.segmentsResent;}} public override long ErrorsReceived{get {return stats.errorsReceived;}} public override long ResetsSent{get {return stats.segmentsSentWithReset;}} public override long CumulativeConnections{get {return stats.cumulativeConnections;}} } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DesigntimeLicenseContext.cs
- XmlSchemaComplexContentExtension.cs
- HtmlGenericControl.cs
- ResourceProperty.cs
- Label.cs
- PerformanceCounterCategory.cs
- MarkupCompilePass2.cs
- HelpKeywordAttribute.cs
- SqlInfoMessageEvent.cs
- TableHeaderCell.cs
- HttpPostedFileBase.cs
- DataGridPageChangedEventArgs.cs
- Timer.cs
- ModifyActivitiesPropertyDescriptor.cs
- SynchronizationContext.cs
- IntSecurity.cs
- BitmapVisualManager.cs
- EllipseGeometry.cs
- DataGridCellInfo.cs
- ByteKeyFrameCollection.cs
- MetadataHelper.cs
- SchemaDeclBase.cs
- ConfigsHelper.cs
- Control.cs
- FlagsAttribute.cs
- RuntimeConfig.cs
- dataprotectionpermissionattribute.cs
- QueryActivatableWorkflowsCommand.cs
- SelectionGlyphBase.cs
- Pointer.cs
- FrameworkContentElementAutomationPeer.cs
- ExpressionEvaluator.cs
- ProxyFragment.cs
- TraceSwitch.cs
- CapacityStreamGeometryContext.cs
- Base64Decoder.cs
- CharacterHit.cs
- InstancePersistenceContext.cs
- Parsers.cs
- ProvidersHelper.cs
- BindToObject.cs
- AttributeConverter.cs
- FontFamilyConverter.cs
- LiteralDesigner.cs
- WebPartUtil.cs
- FontSourceCollection.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- SendActivity.cs
- CompilationLock.cs
- MultiSelectRootGridEntry.cs
- PageCache.cs
- XmlException.cs
- FileDialog_Vista_Interop.cs
- DayRenderEvent.cs
- SerializeAbsoluteContext.cs
- RoutedCommand.cs
- PageTheme.cs
- ShaderEffect.cs
- SoapTypeAttribute.cs
- SearchExpression.cs
- FullTextState.cs
- SectionXmlInfo.cs
- TextOnlyOutput.cs
- SafeCancelMibChangeNotify.cs
- DocumentGrid.cs
- ReadOnlyMetadataCollection.cs
- HtmlControl.cs
- SelectionWordBreaker.cs
- SourceInterpreter.cs
- HandleCollector.cs
- ClientSettingsSection.cs
- PTConverter.cs
- ConfigXmlWhitespace.cs
- ChtmlTextWriter.cs
- BuildProviderAppliesToAttribute.cs
- KeySplineConverter.cs
- RadioButtonPopupAdapter.cs
- BrowserCapabilitiesFactory.cs
- FieldMetadata.cs
- BamlRecordHelper.cs
- Geometry3D.cs
- VirtualDirectoryMappingCollection.cs
- Codec.cs
- CachedPathData.cs
- ModelTreeEnumerator.cs
- ProtocolsConfigurationHandler.cs
- WebInvokeAttribute.cs
- TabletDevice.cs
- AdCreatedEventArgs.cs
- TraceSource.cs
- InputScope.cs
- DataPagerFieldCommandEventArgs.cs
- ListView.cs
- categoryentry.cs
- WebPartManagerInternals.cs
- Transform3DCollection.cs
- SafeRegistryHandle.cs
- x509utils.cs
- HttpPostProtocolReflector.cs
- SubMenuStyle.cs