Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Net / System / Net / NetworkInformation / SystemUdpStatistics.cs / 1 / 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;}} } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ManagementBaseObject.cs
- QueryOperationResponseOfT.cs
- PropagatorResult.cs
- SQLInt32.cs
- JsonDataContract.cs
- CheckBoxField.cs
- TextContainer.cs
- MetadataItemEmitter.cs
- InstanceDataCollection.cs
- ErrorHandler.cs
- CodeExpressionCollection.cs
- TypeDescriptionProviderAttribute.cs
- IconConverter.cs
- XmlSchemaAttribute.cs
- BamlLocalizer.cs
- HtmlTitle.cs
- CodePropertyReferenceExpression.cs
- CalendarDateRangeChangingEventArgs.cs
- ClientUtils.cs
- VisualTreeHelper.cs
- BoundField.cs
- ContentPathSegment.cs
- SchemaElement.cs
- UInt32.cs
- ObjectFullSpanRewriter.cs
- hresults.cs
- PrintPreviewGraphics.cs
- ExceptionUtil.cs
- AttachmentService.cs
- HelpOperationInvoker.cs
- ZipArchive.cs
- ObfuscateAssemblyAttribute.cs
- ColumnTypeConverter.cs
- CodeAssignStatement.cs
- ProgressiveCrcCalculatingStream.cs
- UnorderedHashRepartitionStream.cs
- ArraySegment.cs
- HebrewCalendar.cs
- DataMisalignedException.cs
- BrushMappingModeValidation.cs
- RelatedCurrencyManager.cs
- EventPrivateKey.cs
- HtmlEncodedRawTextWriter.cs
- XPathException.cs
- PackagingUtilities.cs
- List.cs
- PageContentCollection.cs
- ScrollContentPresenter.cs
- LinearGradientBrush.cs
- StateMachineExecutionState.cs
- WebServiceErrorEvent.cs
- NullableConverter.cs
- RowBinding.cs
- FormViewRow.cs
- Deflater.cs
- DataGridViewComboBoxColumn.cs
- __TransparentProxy.cs
- EncryptedKeyHashIdentifierClause.cs
- SchemaNamespaceManager.cs
- WebHttpBindingCollectionElement.cs
- HashHelper.cs
- FreeFormDesigner.cs
- DataObject.cs
- SubqueryRules.cs
- WsdlBuildProvider.cs
- RightsManagementEncryptedStream.cs
- FigureParaClient.cs
- DataGridColumnDropSeparator.cs
- FlatButtonAppearance.cs
- DefaultPropertiesToSend.cs
- EncryptedPackage.cs
- PageThemeParser.cs
- LineUtil.cs
- ObjectTag.cs
- RawStylusInputCustomData.cs
- arabicshape.cs
- XmlEventCache.cs
- Rect.cs
- RootBuilder.cs
- SqlXml.cs
- BaseProcessor.cs
- Point3DCollectionConverter.cs
- SqlFactory.cs
- SafeViewOfFileHandle.cs
- XmlNodeList.cs
- BinaryFormatter.cs
- _Rfc2616CacheValidators.cs
- IgnoreSection.cs
- Int32KeyFrameCollection.cs
- PtsPage.cs
- CallTemplateAction.cs
- OuterGlowBitmapEffect.cs
- SpellerHighlightLayer.cs
- BCLDebug.cs
- hresults.cs
- DynamicMetaObjectBinder.cs
- OutputCacheSettingsSection.cs
- oledbconnectionstring.cs
- PenContexts.cs
- CallbackException.cs