Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / NetworkInformation / SystemUdpStatistics.cs / 1305376 / SystemUdpStatistics.cs
////// namespace System.Net.NetworkInformation { using System.Net.Sockets; using System; using System.ComponentModel; /// /// Provides support for ip configuation information and statistics. /// Udp statistics. internal class SystemUdpStatistics:UdpStatistics { MibUdpStats stats; private SystemUdpStatistics(){} internal SystemUdpStatistics(AddressFamily family){ uint result; if (!ComNetOS.IsPostWin2K){ if (family!= AddressFamily.InterNetwork){ throw new PlatformNotSupportedException(SR.GetString(SR.WinXPRequired)); } result = UnsafeNetInfoNativeMethods.GetUdpStatistics(out stats); } else result = UnsafeNetInfoNativeMethods.GetUdpStatisticsEx(out stats, family); if (result != IpHelperErrors.Success) { throw new NetworkInformationException((int)result); } } public override long DatagramsReceived{get {return stats.datagramsReceived;}} public override long IncomingDatagramsDiscarded{get {return stats.incomingDatagramsDiscarded;}} public override long IncomingDatagramsWithErrors{get {return stats.incomingDatagramsWithErrors;}} public override long DatagramsSent{get {return stats.datagramsSent;}} public override int UdpListeners{get {return (int)stats.udpListeners;}} } } // 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
- RegexCharClass.cs
- COM2ExtendedUITypeEditor.cs
- DataGridViewCellStateChangedEventArgs.cs
- CacheHelper.cs
- TimelineGroup.cs
- GPRECT.cs
- ObjectListItem.cs
- ObjectTokenCategory.cs
- CFStream.cs
- ExtenderHelpers.cs
- StringKeyFrameCollection.cs
- LinkedResource.cs
- GeneralTransform.cs
- GlyphingCache.cs
- CompleteWizardStep.cs
- Compiler.cs
- LineBreakRecord.cs
- MessageQueue.cs
- AnnotationStore.cs
- SizeAnimationUsingKeyFrames.cs
- _NegoState.cs
- InputScope.cs
- XmlSerializerNamespaces.cs
- Point3DValueSerializer.cs
- SystemIPInterfaceProperties.cs
- Errors.cs
- DataGridViewCellStyleContentChangedEventArgs.cs
- ResourcePermissionBaseEntry.cs
- GlobalId.cs
- ColumnHeaderConverter.cs
- EdmItemError.cs
- ConstructorNeedsTagAttribute.cs
- CompressEmulationStream.cs
- storepermission.cs
- DocumentPageHost.cs
- SolidColorBrush.cs
- SafeProcessHandle.cs
- SafeTimerHandle.cs
- EdmValidator.cs
- SessionParameter.cs
- WebBaseEventKeyComparer.cs
- CombinedGeometry.cs
- listitem.cs
- Exception.cs
- HttpListenerPrefixCollection.cs
- BinaryObjectReader.cs
- InheritanceContextHelper.cs
- ApplicationManager.cs
- XpsInterleavingPolicy.cs
- Number.cs
- NavigationCommands.cs
- NativeMethods.cs
- WsatEtwTraceListener.cs
- SingleAnimation.cs
- ForwardPositionQuery.cs
- Panel.cs
- ContentElement.cs
- X509Certificate.cs
- RegistryConfigurationProvider.cs
- Calendar.cs
- EntityDataSourceSelectingEventArgs.cs
- StateMachineTimers.cs
- TreeBuilderXamlTranslator.cs
- ButtonAutomationPeer.cs
- InputScopeConverter.cs
- RequestChannelBinder.cs
- Adorner.cs
- ZoneIdentityPermission.cs
- _Rfc2616CacheValidators.cs
- WorkflowDefinitionContext.cs
- XDRSchema.cs
- HttpListenerPrefixCollection.cs
- WSFederationHttpBindingElement.cs
- DispatchChannelSink.cs
- DataObjectFieldAttribute.cs
- FixedFlowMap.cs
- SqlNotificationRequest.cs
- RecognizedAudio.cs
- EditorBrowsableAttribute.cs
- NamespaceQuery.cs
- CommandPlan.cs
- TreeNodeMouseHoverEvent.cs
- RuntimeHelpers.cs
- XPathSelfQuery.cs
- DbProviderManifest.cs
- ByValueEqualityComparer.cs
- TextControlDesigner.cs
- CompilerTypeWithParams.cs
- PageThemeBuildProvider.cs
- SQLBoolean.cs
- XmlBaseWriter.cs
- BaseProcessor.cs
- ToolCreatedEventArgs.cs
- LinkedResourceCollection.cs
- AsyncDataRequest.cs
- PerformanceCounterPermissionEntry.cs
- XmlArrayAttribute.cs
- CacheDependency.cs
- InvalidOleVariantTypeException.cs
- ErrorWrapper.cs