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
- SafeNativeMethods.cs
- MemberRelationshipService.cs
- GeneralTransform3DGroup.cs
- SqlDataSourceFilteringEventArgs.cs
- SimpleTextLine.cs
- ColumnMapProcessor.cs
- ObjectListCommandEventArgs.cs
- RadialGradientBrush.cs
- CodeNamespaceCollection.cs
- TextLineResult.cs
- PrefixQName.cs
- TextSelectionProcessor.cs
- Point.cs
- XmlTypeAttribute.cs
- TextMarkerSource.cs
- ParameterElementCollection.cs
- FormViewDesigner.cs
- UInt64.cs
- RepeaterItemEventArgs.cs
- EntityViewGenerationConstants.cs
- AllowedAudienceUriElement.cs
- _UriTypeConverter.cs
- StylusPointPropertyId.cs
- _Win32.cs
- SrgsElement.cs
- WebPartManager.cs
- ErrorWebPart.cs
- PositiveTimeSpanValidator.cs
- RegexCharClass.cs
- PanelDesigner.cs
- _ScatterGatherBuffers.cs
- TiffBitmapEncoder.cs
- FactoryRecord.cs
- OrderedDictionary.cs
- ActivityXRefPropertyEditor.cs
- ElementHostPropertyMap.cs
- SvcMapFileSerializer.cs
- StretchValidation.cs
- Attributes.cs
- EncoderParameter.cs
- BitmapEffectGeneralTransform.cs
- Convert.cs
- Exceptions.cs
- PropertyValidationContext.cs
- QueryCacheEntry.cs
- PanelStyle.cs
- QilXmlReader.cs
- PresentationSource.cs
- WorkflowServiceHostFactory.cs
- LocalizedNameDescriptionPair.cs
- BamlCollectionHolder.cs
- OdbcCommand.cs
- StorageComplexPropertyMapping.cs
- NonSerializedAttribute.cs
- ArgIterator.cs
- CheckBoxField.cs
- DocumentXPathNavigator.cs
- ImageListUtils.cs
- VolatileEnlistmentMultiplexing.cs
- AuthenticatedStream.cs
- DataViewManager.cs
- FindCriteria11.cs
- MissingSatelliteAssemblyException.cs
- Matrix3DStack.cs
- PublisherIdentityPermission.cs
- SchemaConstraints.cs
- WindowsPen.cs
- ThicknessConverter.cs
- IRCollection.cs
- EnumUnknown.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- ConfigsHelper.cs
- XmlSignificantWhitespace.cs
- InvalidTimeZoneException.cs
- XmlLoader.cs
- BufferedStream2.cs
- PathFigureCollection.cs
- ToolStripPanelDesigner.cs
- HttpListenerContext.cs
- DrawingCollection.cs
- ScriptRegistrationManager.cs
- BinaryExpressionHelper.cs
- Options.cs
- FlowNode.cs
- _WebProxyDataBuilder.cs
- WebPartDescriptionCollection.cs
- BaseInfoTable.cs
- NetSectionGroup.cs
- SaveWorkflowAsyncResult.cs
- DataGridViewLinkColumn.cs
- ECDiffieHellmanCng.cs
- input.cs
- QueryContinueDragEvent.cs
- Identifier.cs
- RenderingEventArgs.cs
- LambdaCompiler.Address.cs
- SqlDataSourceFilteringEventArgs.cs
- UpDownEvent.cs
- ListItemsPage.cs
- OleStrCAMarshaler.cs