Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- TextBoxView.cs
- SortDescription.cs
- ChangeConflicts.cs
- odbcmetadatacolumnnames.cs
- NavigationPropertySingletonExpression.cs
- ServerIdentity.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- KoreanLunisolarCalendar.cs
- XPathDocumentIterator.cs
- ParserOptions.cs
- HybridDictionary.cs
- CaseCqlBlock.cs
- XmlSchemaFacet.cs
- SafeBitVector32.cs
- EventLogger.cs
- UserControl.cs
- FilteredAttributeCollection.cs
- PropertyManager.cs
- WeakEventManager.cs
- CodeNamespaceCollection.cs
- Selection.cs
- WebServiceTypeData.cs
- RuntimeConfig.cs
- ByteAnimationBase.cs
- EventNotify.cs
- BasicHttpMessageSecurity.cs
- InteropExecutor.cs
- GestureRecognizer.cs
- CollectionChangeEventArgs.cs
- CommonDialog.cs
- SqlCacheDependencyDatabaseCollection.cs
- TextTreeUndoUnit.cs
- QueryOperationResponseOfT.cs
- InstancePersistenceContext.cs
- MethodExpression.cs
- StatusStrip.cs
- Compiler.cs
- ToolStripContainer.cs
- StateWorkerRequest.cs
- DataSetUtil.cs
- Latin1Encoding.cs
- RowUpdatingEventArgs.cs
- DbProviderFactory.cs
- BindingObserver.cs
- DateTimeValueSerializerContext.cs
- URLMembershipCondition.cs
- Directory.cs
- CodeDOMUtility.cs
- ProgressBar.cs
- StatusBarItem.cs
- TypeReference.cs
- AttributeProviderAttribute.cs
- TextSchema.cs
- Timer.cs
- ColorContext.cs
- RouteTable.cs
- AssociativeAggregationOperator.cs
- PolyLineSegment.cs
- DbException.cs
- SQLInt32.cs
- WebPartVerb.cs
- AllowedAudienceUriElement.cs
- COSERVERINFO.cs
- ProfileProvider.cs
- __Filters.cs
- GuidTagList.cs
- Soap.cs
- CodeMethodReturnStatement.cs
- PropertyRecord.cs
- CharAnimationBase.cs
- GetChildSubtree.cs
- SizeLimitedCache.cs
- NumberFormatter.cs
- TextProperties.cs
- ServiceBusyException.cs
- DomNameTable.cs
- WebAdminConfigurationHelper.cs
- DeviceContexts.cs
- GridViewColumnCollection.cs
- DateTimeValueSerializer.cs
- RequiredFieldValidator.cs
- ValidatorCompatibilityHelper.cs
- AbsoluteQuery.cs
- CompilerResults.cs
- CellQuery.cs
- HtmlInputRadioButton.cs
- SocketCache.cs
- Model3DGroup.cs
- PrimitiveXmlSerializers.cs
- DrawingContextWalker.cs
- DesignerHelpers.cs
- TraceEventCache.cs
- TabletDeviceInfo.cs
- ContextMenuStrip.cs
- TextRunTypographyProperties.cs
- RoutedEventValueSerializer.cs
- ListViewGroupCollectionEditor.cs
- ListViewTableRow.cs
- FileRecordSequenceHelper.cs
- Util.cs