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
- ExtensionQuery.cs
- HttpListenerContext.cs
- XmlCharacterData.cs
- COSERVERINFO.cs
- dtdvalidator.cs
- NativeRecognizer.cs
- ListCollectionView.cs
- CompositeFontParser.cs
- DataKeyArray.cs
- TextSearch.cs
- ReservationNotFoundException.cs
- FormatVersion.cs
- BypassElementCollection.cs
- MeasureItemEvent.cs
- DBConnectionString.cs
- DES.cs
- RichTextBoxConstants.cs
- thaishape.cs
- MatrixTransform3D.cs
- EventData.cs
- CodeStatementCollection.cs
- CodePageEncoding.cs
- PointKeyFrameCollection.cs
- ForeignConstraint.cs
- counter.cs
- DataGridViewSelectedCellCollection.cs
- BindingList.cs
- LogLogRecordHeader.cs
- DataGridViewRowCancelEventArgs.cs
- _BaseOverlappedAsyncResult.cs
- ExtensionWindow.cs
- TypeDescriptionProvider.cs
- IsolatedStorageFilePermission.cs
- Thumb.cs
- Cursor.cs
- XmlReaderDelegator.cs
- DeclaredTypeElementCollection.cs
- SpeechSeg.cs
- XmlSchemaAttributeGroupRef.cs
- _OSSOCK.cs
- ObsoleteAttribute.cs
- ParameterBuilder.cs
- remotingproxy.cs
- PlatformNotSupportedException.cs
- OrderingInfo.cs
- SystemPens.cs
- VisualCollection.cs
- TextServicesCompartment.cs
- HttpFileCollection.cs
- InstancePersistenceContext.cs
- TraceUtils.cs
- CommandArguments.cs
- PrintController.cs
- AssemblyName.cs
- WindowsScrollBarBits.cs
- TypeSemantics.cs
- ListViewDeletedEventArgs.cs
- MimeTypeMapper.cs
- EntityDataSourceChangedEventArgs.cs
- Socket.cs
- UrlMappingsModule.cs
- CheckableControlBaseAdapter.cs
- ChtmlTextWriter.cs
- DataGridViewTextBoxCell.cs
- EventHandlerList.cs
- AvTraceDetails.cs
- PreservationFileReader.cs
- FilePresentation.cs
- SingleAnimationBase.cs
- MarshalByValueComponent.cs
- Input.cs
- PointCollection.cs
- ListViewTableRow.cs
- PassportAuthenticationModule.cs
- SuppressIldasmAttribute.cs
- DispatcherExceptionEventArgs.cs
- AnnotationAdorner.cs
- MailAddressParser.cs
- EventHandlersStore.cs
- Translator.cs
- UIElementParagraph.cs
- RegexEditorDialog.cs
- OleDbRowUpdatingEvent.cs
- DbQueryCommandTree.cs
- WebPartConnectionCollection.cs
- StoreContentChangedEventArgs.cs
- Assembly.cs
- RenderDataDrawingContext.cs
- Geometry3D.cs
- NetSectionGroup.cs
- AnyReturnReader.cs
- ProviderIncompatibleException.cs
- CustomCredentialPolicy.cs
- ParentUndoUnit.cs
- ProcessInputEventArgs.cs
- ExpressionList.cs
- TextElement.cs
- ContextItem.cs
- IconBitmapDecoder.cs
- Hash.cs