Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- MenuItem.cs
- WinEventWrap.cs
- Pts.cs
- TableItemProviderWrapper.cs
- LoopExpression.cs
- LoadWorkflowByInstanceKeyCommand.cs
- MergeFilterQuery.cs
- UrlAuthorizationModule.cs
- BlurBitmapEffect.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- SourceFilter.cs
- Hashtable.cs
- ProtocolsConfigurationEntry.cs
- UnmanagedMarshal.cs
- DataFieldCollectionEditor.cs
- SoapAttributes.cs
- ProfessionalColors.cs
- ConstraintStruct.cs
- C14NUtil.cs
- AggregateNode.cs
- SimpleRecyclingCache.cs
- PerfProviderCollection.cs
- PageBuildProvider.cs
- IPeerNeighbor.cs
- Literal.cs
- InkCanvasAutomationPeer.cs
- BindingOperations.cs
- FrameworkElementAutomationPeer.cs
- RNGCryptoServiceProvider.cs
- CookieParameter.cs
- AssemblyCache.cs
- ClassHandlersStore.cs
- CodeConstructor.cs
- ProfilePropertySettingsCollection.cs
- ListView.cs
- ChannelHandler.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- InvalidCastException.cs
- CodeNamespaceImportCollection.cs
- PropertiesTab.cs
- XmlDataSourceView.cs
- ApplicationSecurityInfo.cs
- SiteMapDataSourceView.cs
- QuaternionConverter.cs
- Cursor.cs
- StylusShape.cs
- Attribute.cs
- EventItfInfo.cs
- RadioButton.cs
- AssociationEndMember.cs
- BitmapEffectGroup.cs
- VectorCollectionConverter.cs
- WebServiceResponse.cs
- ConfigurationValues.cs
- Timeline.cs
- EnumCodeDomSerializer.cs
- FontCollection.cs
- DoubleAnimation.cs
- ProcessInputEventArgs.cs
- RegexReplacement.cs
- SharedHttpTransportManager.cs
- AuthenticatedStream.cs
- DrawingBrush.cs
- Grid.cs
- BoundsDrawingContextWalker.cs
- MarkupWriter.cs
- HandlerMappingMemo.cs
- unsafenativemethodsother.cs
- XmlCharCheckingReader.cs
- Formatter.cs
- EncodingNLS.cs
- SimpleLine.cs
- ProfileGroupSettings.cs
- WebConfigurationManager.cs
- PartitionedDataSource.cs
- CatchBlock.cs
- ClientType.cs
- RotationValidation.cs
- OptimalTextSource.cs
- RuleInfoComparer.cs
- FontDialog.cs
- DataGridViewCheckBoxColumn.cs
- UserControlParser.cs
- ByteStreamGeometryContext.cs
- AlternateViewCollection.cs
- TrackingParameters.cs
- URLMembershipCondition.cs
- MediaElementAutomationPeer.cs
- GeometryConverter.cs
- SchemaHelper.cs
- HttpSessionStateWrapper.cs
- DashStyle.cs
- CompilerInfo.cs
- PropertyOverridesDialog.cs
- ControlCodeDomSerializer.cs
- ProgramPublisher.cs
- EndPoint.cs
- ExpressionVisitor.cs
- ListSortDescription.cs
- RNGCryptoServiceProvider.cs