Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / NetworkInformation / SystemTcpStatistics.cs / 1305376 / 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
- SHA384.cs
- ServiceOperationWrapper.cs
- SQLInt64.cs
- ServiceDiscoveryBehavior.cs
- LazyTextWriterCreator.cs
- ProxyFragment.cs
- DataMember.cs
- SrgsRulesCollection.cs
- Sentence.cs
- SmiMetaDataProperty.cs
- HttpProcessUtility.cs
- WindowsEditBox.cs
- Variable.cs
- CopyCodeAction.cs
- GridEntryCollection.cs
- BamlBinaryReader.cs
- ScriptReference.cs
- InvalidPropValue.cs
- SqlConnectionStringBuilder.cs
- CodeMethodInvokeExpression.cs
- DesignerDataSchemaClass.cs
- DataSourceCache.cs
- AnnotationComponentChooser.cs
- GlyphShapingProperties.cs
- RemotingClientProxy.cs
- FormCollection.cs
- VirtualDirectoryMapping.cs
- XmlNamespaceDeclarationsAttribute.cs
- PropertySet.cs
- PostBackTrigger.cs
- EventHandlerList.cs
- HandledMouseEvent.cs
- LineServices.cs
- NativeCppClassAttribute.cs
- XmlSchemaParticle.cs
- Font.cs
- FactoryGenerator.cs
- OleCmdHelper.cs
- MessageFilterException.cs
- BuildResultCache.cs
- ValidationEventArgs.cs
- ObjectDataSourceEventArgs.cs
- ButtonFieldBase.cs
- WebPartAddingEventArgs.cs
- ToolStripPanelRow.cs
- ProfileSettingsCollection.cs
- HttpCachePolicyWrapper.cs
- CodeDOMProvider.cs
- SortExpressionBuilder.cs
- QuaternionAnimation.cs
- MasterPageParser.cs
- CorrelationTokenInvalidatedHandler.cs
- XamlPointCollectionSerializer.cs
- RawMouseInputReport.cs
- CodeLinePragma.cs
- graph.cs
- TransformerInfo.cs
- MaskInputRejectedEventArgs.cs
- PatternMatcher.cs
- DataTableReader.cs
- EpmContentDeSerializerBase.cs
- UpDownEvent.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- ClientTargetSection.cs
- VirtualizedCellInfoCollection.cs
- DomNameTable.cs
- IndexerNameAttribute.cs
- DataGridViewCellStyleContentChangedEventArgs.cs
- XmlDocumentType.cs
- ExpressionBindingCollection.cs
- altserialization.cs
- LinkButton.cs
- ActivationArguments.cs
- LinqToSqlWrapper.cs
- DataGridViewHitTestInfo.cs
- PathGeometry.cs
- shaper.cs
- MailWebEventProvider.cs
- ActivitySurrogateSelector.cs
- EdmProviderManifest.cs
- BulletedListDesigner.cs
- RemotingConfigParser.cs
- LifetimeServices.cs
- InheritanceService.cs
- GetPageCompletedEventArgs.cs
- MulticastNotSupportedException.cs
- VoiceSynthesis.cs
- EncryptedReference.cs
- ColorAnimationUsingKeyFrames.cs
- ViewCellSlot.cs
- RootBuilder.cs
- GacUtil.cs
- WaitHandleCannotBeOpenedException.cs
- PrePrepareMethodAttribute.cs
- DoubleLinkListEnumerator.cs
- DockEditor.cs
- ProcessThread.cs
- SystemIdentity.cs
- IntSecurity.cs
- WebPartChrome.cs