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
- MailBnfHelper.cs
- WasAdminWrapper.cs
- EpmContentSerializer.cs
- EntityDataSourceContainerNameItem.cs
- AsnEncodedData.cs
- StatusBarItem.cs
- ValidationRuleCollection.cs
- ProfileSettings.cs
- XmlMembersMapping.cs
- SurrogateSelector.cs
- PropertyInformationCollection.cs
- SqlDeflator.cs
- DrawingContext.cs
- DeleteBookmarkScope.cs
- While.cs
- TypographyProperties.cs
- DataService.cs
- StylusPointPropertyId.cs
- DetailsViewRowCollection.cs
- ToolStripItemCollection.cs
- TypeUnloadedException.cs
- _ScatterGatherBuffers.cs
- SafeCoTaskMem.cs
- InheritanceAttribute.cs
- LayoutEngine.cs
- GenericParameterDataContract.cs
- XmlToDatasetMap.cs
- Helpers.cs
- EdmToObjectNamespaceMap.cs
- FieldToken.cs
- PermissionListSet.cs
- XmlCustomFormatter.cs
- returneventsaver.cs
- XslNumber.cs
- BigInt.cs
- BitmapEncoder.cs
- Config.cs
- ThreadAbortException.cs
- DragDrop.cs
- LineInfo.cs
- DesignOnlyAttribute.cs
- RuntimeConfigurationRecord.cs
- EditableTreeList.cs
- ExtensionWindowHeader.cs
- Wizard.cs
- PropertyValueChangedEvent.cs
- MobileControlsSectionHelper.cs
- CodeRegionDirective.cs
- StringHelper.cs
- ColumnMapTranslator.cs
- StringInfo.cs
- IdentityNotMappedException.cs
- EntityDataSourceWizardForm.cs
- StorageEntityContainerMapping.cs
- Decoder.cs
- securestring.cs
- SafeNativeMethodsMilCoreApi.cs
- MetadataPropertyvalue.cs
- SchemaAttDef.cs
- AuthenticationService.cs
- InstanceCreationEditor.cs
- InterleavedZipPartStream.cs
- DataServiceProcessingPipeline.cs
- LocationUpdates.cs
- EncoderBestFitFallback.cs
- HtmlInputPassword.cs
- TreeViewImageIndexConverter.cs
- CodeBlockBuilder.cs
- TypedTableBaseExtensions.cs
- FirstMatchCodeGroup.cs
- XpsFilter.cs
- RetriableClipboard.cs
- HashStream.cs
- LinkClickEvent.cs
- MessageSecurityOverMsmq.cs
- HttpDictionary.cs
- XPathPatternBuilder.cs
- ElementUtil.cs
- CodeDomSerializerBase.cs
- WebPartDescription.cs
- GrammarBuilderBase.cs
- ClientCredentialsElement.cs
- ReturnValue.cs
- SimpleTypesSurrogate.cs
- DetailsViewPagerRow.cs
- SimpleBitVector32.cs
- Stroke.cs
- EntityContainerEmitter.cs
- Calendar.cs
- IResourceProvider.cs
- WebPartConnectionsEventArgs.cs
- RijndaelManagedTransform.cs
- SqlDependencyListener.cs
- HiddenFieldDesigner.cs
- NumberSubstitution.cs
- MaskPropertyEditor.cs
- TreeViewHitTestInfo.cs
- SafeRegistryKey.cs
- cookiecollection.cs
- ColorTransform.cs