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
///
/// Provides support for ip configuation information and statistics.
///
///
namespace System.Net.NetworkInformation {
using System.Net.Sockets;
using System;
using System.ComponentModel;
/// 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.
///
/// Provides support for ip configuation information and statistics.
///
///
namespace System.Net.NetworkInformation {
using System.Net.Sockets;
using System;
using System.ComponentModel;
/// 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
- DeferredSelectedIndexReference.cs
- MatrixTransform.cs
- EraserBehavior.cs
- XmlAttributeHolder.cs
- SQLRoleProvider.cs
- InfoCardListRequest.cs
- IdentityManager.cs
- IChannel.cs
- Assembly.cs
- ColumnHeader.cs
- ExpressionEditorAttribute.cs
- PhonemeConverter.cs
- TypeExtensions.cs
- SafeBitVector32.cs
- FileNotFoundException.cs
- StreamingContext.cs
- InputLanguageCollection.cs
- CqlParser.cs
- FileIOPermission.cs
- HtmlTableRowCollection.cs
- SectionInformation.cs
- FileIOPermission.cs
- HttpPostProtocolImporter.cs
- BufferBuilder.cs
- RawKeyboardInputReport.cs
- XmlHierarchyData.cs
- ChildDocumentBlock.cs
- ObjectListItemCollection.cs
- HtmlTernaryTree.cs
- Setter.cs
- AsnEncodedData.cs
- TemplateControlBuildProvider.cs
- MailDefinition.cs
- XmlSchemaCollection.cs
- CheckBoxRenderer.cs
- ZeroOpNode.cs
- AuthenticateEventArgs.cs
- MetabaseReader.cs
- MembershipPasswordException.cs
- HostUtils.cs
- WebPartsPersonalization.cs
- GatewayIPAddressInformationCollection.cs
- DesignerVerb.cs
- CodeTypeReferenceExpression.cs
- ChtmlTextWriter.cs
- RequestNavigateEventArgs.cs
- GraphicsPathIterator.cs
- ListBoxAutomationPeer.cs
- SqlNodeTypeOperators.cs
- RelationshipFixer.cs
- CompressionTransform.cs
- PropertyChangedEventArgs.cs
- EntityTemplateUserControl.cs
- ReadWriteObjectLock.cs
- WebPartConnectionsConnectVerb.cs
- FormView.cs
- TypeUsageBuilder.cs
- QualifiedId.cs
- Rijndael.cs
- ByteRangeDownloader.cs
- StorageEntityContainerMapping.cs
- FormViewDeleteEventArgs.cs
- DataRecordInfo.cs
- CacheChildrenQuery.cs
- SystemInfo.cs
- ReadOnlyPropertyMetadata.cs
- HttpGetClientProtocol.cs
- NegationPusher.cs
- WsdlBuildProvider.cs
- Errors.cs
- DataExpression.cs
- DecimalAverageAggregationOperator.cs
- JapaneseLunisolarCalendar.cs
- WmiEventSink.cs
- AliasGenerator.cs
- CalendarAutoFormatDialog.cs
- HTMLTagNameToTypeMapper.cs
- QfeChecker.cs
- WebPartTransformerCollection.cs
- ToolStripMenuItem.cs
- Crypto.cs
- DefaultValueAttribute.cs
- CompilerState.cs
- HttpApplicationStateWrapper.cs
- Endpoint.cs
- X509AsymmetricSecurityKey.cs
- HandleDictionary.cs
- MulticastIPAddressInformationCollection.cs
- QueryCursorEventArgs.cs
- TabPage.cs
- Context.cs
- AudioLevelUpdatedEventArgs.cs
- QuadraticBezierSegment.cs
- FixedHyperLink.cs
- XmlSchemaSearchPattern.cs
- BulletedListEventArgs.cs
- ServiceOperationInvoker.cs
- OperandQuery.cs
- DataReceivedEventArgs.cs
- Nodes.cs