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
- AsynchronousChannel.cs
- MobileControl.cs
- ItemDragEvent.cs
- SequentialUshortCollection.cs
- TraceHandlerErrorFormatter.cs
- ReferentialConstraint.cs
- PersonalizationStateInfoCollection.cs
- QuaternionRotation3D.cs
- KnownBoxes.cs
- TcpTransportElement.cs
- CodeAttributeDeclaration.cs
- XmlAnyElementAttributes.cs
- RectangleHotSpot.cs
- Activity.cs
- InvokePatternIdentifiers.cs
- ClipboardProcessor.cs
- HttpClientCertificate.cs
- StateChangeEvent.cs
- HelloMessageApril2005.cs
- EncoderNLS.cs
- InstanceDataCollectionCollection.cs
- ClosureBinding.cs
- DbConnectionInternal.cs
- FormatVersion.cs
- PersonalizationStateInfoCollection.cs
- TrackingServices.cs
- ErrorTableItemStyle.cs
- NativeMethods.cs
- RouteTable.cs
- _DynamicWinsockMethods.cs
- XmlSignatureManifest.cs
- LocatorGroup.cs
- RecordManager.cs
- ListViewDeletedEventArgs.cs
- RemotingSurrogateSelector.cs
- FileDialog_Vista.cs
- RSAOAEPKeyExchangeFormatter.cs
- NetCodeGroup.cs
- MessageFormatterConverter.cs
- HtmlTitle.cs
- EntityUtil.cs
- AsyncSerializedWorker.cs
- SplashScreen.cs
- DataServiceHostFactory.cs
- TraceSwitch.cs
- OperationDescription.cs
- WebException.cs
- AspNetSynchronizationContext.cs
- DiscoveryInnerClientAdhocCD1.cs
- XmlParserContext.cs
- SmtpException.cs
- WSHttpBindingBase.cs
- SourceSwitch.cs
- SafeRightsManagementSessionHandle.cs
- SecurityResources.cs
- sapiproxy.cs
- PropertyInformationCollection.cs
- validationstate.cs
- QueueProcessor.cs
- InputReportEventArgs.cs
- ICspAsymmetricAlgorithm.cs
- ComponentCollection.cs
- sqlcontext.cs
- Model3D.cs
- FixedSOMPageConstructor.cs
- DataServiceRequestOfT.cs
- CorrelationResolver.cs
- DelegateSerializationHolder.cs
- DefaultHttpHandler.cs
- Stream.cs
- PageParserFilter.cs
- ParserContext.cs
- TextBoxDesigner.cs
- SecurityException.cs
- Preprocessor.cs
- FixedSchema.cs
- XmlLanguageConverter.cs
- QueryPageSettingsEventArgs.cs
- ThreadAbortException.cs
- XmlReader.cs
- EDesignUtil.cs
- WebConfigurationManager.cs
- TypeContext.cs
- PixelFormats.cs
- RolePrincipal.cs
- MembershipPasswordException.cs
- IPAddress.cs
- SpellerError.cs
- Scripts.cs
- ProfessionalColorTable.cs
- StorageScalarPropertyMapping.cs
- EventWaitHandle.cs
- SystemResources.cs
- ResourceExpressionBuilder.cs
- UpdateExpressionVisitor.cs
- MenuTracker.cs
- ServiceRoute.cs
- WebPageTraceListener.cs
- Utils.cs
- DataObject.cs