Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- ProcessHostFactoryHelper.cs
- SafeRightsManagementHandle.cs
- DatePicker.cs
- ContentValidator.cs
- HttpFileCollectionBase.cs
- KnownBoxes.cs
- RegexGroup.cs
- ProfileModule.cs
- DefaultPropertyAttribute.cs
- ToolStripDropDownItem.cs
- ActivityInterfaces.cs
- HostingEnvironmentWrapper.cs
- DefaultMemberAttribute.cs
- ErrorHandlerModule.cs
- InitializerFacet.cs
- CompositeFontFamily.cs
- NamespaceDisplay.xaml.cs
- ToolStripItemClickedEventArgs.cs
- EncryptedType.cs
- AnimationClock.cs
- CodeDOMUtility.cs
- GetMemberBinder.cs
- ComboBox.cs
- ResourceManagerWrapper.cs
- DecimalKeyFrameCollection.cs
- TextFormatterHost.cs
- TimeEnumHelper.cs
- StringAnimationBase.cs
- BitmapCache.cs
- cryptoapiTransform.cs
- COM2ComponentEditor.cs
- FormViewUpdateEventArgs.cs
- Duration.cs
- XmlSiteMapProvider.cs
- GeneralTransform.cs
- SQLChars.cs
- ApplyTemplatesAction.cs
- DataControlCommands.cs
- FixedSOMTableRow.cs
- RuleConditionDialog.cs
- GatewayIPAddressInformationCollection.cs
- Formatter.cs
- Win32PrintDialog.cs
- DescendentsWalkerBase.cs
- CommandHelpers.cs
- SymbolUsageManager.cs
- OrderedDictionaryStateHelper.cs
- AmbientValueAttribute.cs
- BitmapFrameEncode.cs
- DataGridColumnEventArgs.cs
- RemoteCryptoSignHashRequest.cs
- ConfigurationValue.cs
- PageRequestManager.cs
- OracleConnectionStringBuilder.cs
- DataGridViewColumnCollectionDialog.cs
- RenderCapability.cs
- WebReference.cs
- SafeNativeMethodsMilCoreApi.cs
- ExpressionEvaluator.cs
- RawStylusSystemGestureInputReport.cs
- QueryAsyncResult.cs
- AuthenticatedStream.cs
- DataRecordObjectView.cs
- EntityModelBuildProvider.cs
- AsyncStreamReader.cs
- CannotUnloadAppDomainException.cs
- MessageEventSubscriptionService.cs
- XmlSchemaDocumentation.cs
- IISUnsafeMethods.cs
- DataGridColumnHeader.cs
- DataGridViewLayoutData.cs
- Point3DAnimationUsingKeyFrames.cs
- PrimitiveCodeDomSerializer.cs
- ServiceMetadataPublishingElement.cs
- TemplateBamlTreeBuilder.cs
- CryptoStream.cs
- ZipIOModeEnforcingStream.cs
- Transform.cs
- Calendar.cs
- ListViewUpdatedEventArgs.cs
- Converter.cs
- StrokeRenderer.cs
- BooleanStorage.cs
- GeneralTransform3DTo2DTo3D.cs
- DictionaryBase.cs
- StylusEventArgs.cs
- __Filters.cs
- OverloadGroupAttribute.cs
- SubMenuStyleCollection.cs
- Cursor.cs
- ToolStripItemBehavior.cs
- TextDecorationLocationValidation.cs
- IPAddress.cs
- PointValueSerializer.cs
- MulticastOption.cs
- Permission.cs
- ConnectionPoint.cs
- SerialReceived.cs
- ConfigurationPropertyCollection.cs
- ToolStripDropDownClosedEventArgs.cs