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
- RSAPKCS1KeyExchangeDeformatter.cs
- LineServices.cs
- CompositeFontFamily.cs
- DbProviderManifest.cs
- FreezableDefaultValueFactory.cs
- XmlQuerySequence.cs
- SqlRecordBuffer.cs
- BufferedGraphicsManager.cs
- Int64.cs
- Row.cs
- PointLightBase.cs
- ConsumerConnectionPoint.cs
- TextRenderer.cs
- DataGridViewTopLeftHeaderCell.cs
- DecoratedNameAttribute.cs
- NumericUpDownAcceleration.cs
- LoggedException.cs
- DeclarativeCatalogPart.cs
- ObjectTokenCategory.cs
- ToolStripComboBox.cs
- SchemaObjectWriter.cs
- FrameAutomationPeer.cs
- TypeGeneratedEventArgs.cs
- DataStreamFromComStream.cs
- BitmapEffectInput.cs
- RefreshPropertiesAttribute.cs
- OuterGlowBitmapEffect.cs
- PackageStore.cs
- SelectionItemPattern.cs
- String.cs
- ActivityWithResultConverter.cs
- PassportAuthenticationModule.cs
- DbProviderSpecificTypePropertyAttribute.cs
- ConfigurationManagerHelperFactory.cs
- LocatorBase.cs
- DrawingImage.cs
- GreaterThan.cs
- ExtentKey.cs
- TextEditorCharacters.cs
- PropertyGridEditorPart.cs
- ProcessModelInfo.cs
- SspiNegotiationTokenProvider.cs
- QueryTaskGroupState.cs
- DesignerOptionService.cs
- wgx_render.cs
- ToolTipAutomationPeer.cs
- SimpleHandlerFactory.cs
- EndOfStreamException.cs
- BuildProvider.cs
- SQLChars.cs
- Compress.cs
- DataServiceRequestOfT.cs
- CaseInsensitiveComparer.cs
- DesignRelationCollection.cs
- PropertyDescriptorComparer.cs
- ContextStack.cs
- StrokeCollection2.cs
- DecoderExceptionFallback.cs
- Trace.cs
- Timer.cs
- MailWriter.cs
- LassoHelper.cs
- ProfileService.cs
- AdapterUtil.cs
- __TransparentProxy.cs
- FileAuthorizationModule.cs
- CounterSample.cs
- FillErrorEventArgs.cs
- BatchServiceHost.cs
- ClusterSafeNativeMethods.cs
- ResourceDefaultValueAttribute.cs
- ByteAnimationUsingKeyFrames.cs
- CompoundFileDeflateTransform.cs
- FrameworkRichTextComposition.cs
- ProjectionCamera.cs
- FontNameEditor.cs
- SpellerStatusTable.cs
- XmlReflectionMember.cs
- listviewsubitemcollectioneditor.cs
- StateDesigner.TransitionInfo.cs
- SqlNotificationRequest.cs
- TypeBuilder.cs
- CustomCategoryAttribute.cs
- ColumnMap.cs
- BooleanStorage.cs
- SweepDirectionValidation.cs
- InvokeHandlers.cs
- DocumentsTrace.cs
- AnnotationAdorner.cs
- MILUtilities.cs
- EntityViewGenerationAttribute.cs
- brushes.cs
- UInt32Converter.cs
- SettingsBase.cs
- ProfileSettings.cs
- FragmentQueryProcessor.cs
- DynamicFilter.cs
- RotateTransform3D.cs
- DeliveryStrategy.cs
- TypeSystemProvider.cs