Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / Net / System / Net / NetworkInformation / PingOptions.cs / 1 / PingOptions.cs
//determines which options will be used for sending icmp requests, as well as what options //were set in the returned icmp reply. namespace System.Net.NetworkInformation { // Represent the possible ip options used for the icmp packet public class PingOptions { const int DontFragmentFlag = 2; int ttl = 128; bool dontFragment; internal PingOptions (IPOptions options) { this.ttl = options.ttl; this.dontFragment = ((options.flags & DontFragmentFlag) > 0 ? true : false); } public PingOptions (int ttl, bool dontFragment) { if (ttl <= 0) { throw new ArgumentOutOfRangeException("ttl"); } this.ttl = ttl; this.dontFragment = dontFragment; } public PingOptions () { } public int Ttl { get { return ttl; } set { if (value <= 0) { throw new ArgumentOutOfRangeException("value"); } ttl = value; //useful to discover routes } } public bool DontFragment { get { return dontFragment; } set { dontFragment = value; //useful for discovering mtu } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //determines which options will be used for sending icmp requests, as well as what options //were set in the returned icmp reply. namespace System.Net.NetworkInformation { // Represent the possible ip options used for the icmp packet public class PingOptions { const int DontFragmentFlag = 2; int ttl = 128; bool dontFragment; internal PingOptions (IPOptions options) { this.ttl = options.ttl; this.dontFragment = ((options.flags & DontFragmentFlag) > 0 ? true : false); } public PingOptions (int ttl, bool dontFragment) { if (ttl <= 0) { throw new ArgumentOutOfRangeException("ttl"); } this.ttl = ttl; this.dontFragment = dontFragment; } public PingOptions () { } public int Ttl { get { return ttl; } set { if (value <= 0) { throw new ArgumentOutOfRangeException("value"); } ttl = value; //useful to discover routes } } public bool DontFragment { get { return dontFragment; } set { dontFragment = value; //useful for discovering mtu } } } } // 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
- SqlConnection.cs
- PolyLineSegment.cs
- BuildResult.cs
- SHA1.cs
- FormViewDeleteEventArgs.cs
- DataBindingCollection.cs
- InputReport.cs
- LoadRetryHandler.cs
- FileIOPermission.cs
- MultiPageTextView.cs
- future.cs
- PixelFormat.cs
- DbConvert.cs
- DLinqColumnProvider.cs
- DataGridColumnHeaderCollection.cs
- XPathSelectionIterator.cs
- ServiceDescriptions.cs
- SR.cs
- PropertyRef.cs
- DesignerWebPartChrome.cs
- ExtensionDataReader.cs
- ReturnEventArgs.cs
- WebControlsSection.cs
- CharStorage.cs
- ReflectTypeDescriptionProvider.cs
- PropertyConverter.cs
- WsatStrings.cs
- SchemaImporter.cs
- TargetInvocationException.cs
- FontCacheLogic.cs
- MetricEntry.cs
- ColumnWidthChangingEvent.cs
- EntityDataSourceSelectingEventArgs.cs
- Exceptions.cs
- ColumnMap.cs
- RbTree.cs
- InputManager.cs
- TabletDeviceInfo.cs
- CursorConverter.cs
- SafeArrayRankMismatchException.cs
- CompatibleComparer.cs
- CurrentChangedEventManager.cs
- XmlSerializationWriter.cs
- COM2TypeInfoProcessor.cs
- HtmlLink.cs
- EventListener.cs
- Renderer.cs
- mediaeventshelper.cs
- MinimizableAttributeTypeConverter.cs
- ModelPropertyCollectionImpl.cs
- CodeConditionStatement.cs
- SessionSymmetricMessageSecurityProtocolFactory.cs
- Debug.cs
- ConnectorSelectionGlyph.cs
- GroupPartitionExpr.cs
- Double.cs
- ObjectCacheHost.cs
- ResourceExpressionEditorSheet.cs
- ErrorRuntimeConfig.cs
- GlyphsSerializer.cs
- Membership.cs
- FactoryGenerator.cs
- DynamicValueConverter.cs
- FrameAutomationPeer.cs
- WindowsListViewItemCheckBox.cs
- ColumnMap.cs
- Internal.cs
- CodeTypeConstructor.cs
- DeclarationUpdate.cs
- BlurBitmapEffect.cs
- Property.cs
- CodeGotoStatement.cs
- ReflectionPermission.cs
- Transform.cs
- CompilerInfo.cs
- ItemCollection.cs
- EventArgs.cs
- GeneralTransform3DGroup.cs
- PropertiesTab.cs
- DbConnectionPoolIdentity.cs
- ImportContext.cs
- ConfigurationStrings.cs
- PointCollectionConverter.cs
- BuildDependencySet.cs
- PropertyInformationCollection.cs
- LineInfo.cs
- ListBindingHelper.cs
- KeyInstance.cs
- Overlapped.cs
- TemplateXamlTreeBuilder.cs
- DataGridHeaderBorder.cs
- NumericPagerField.cs
- _ProxyRegBlob.cs
- XmlArrayAttribute.cs
- TracingConnection.cs
- PromptBuilder.cs
- BlobPersonalizationState.cs
- ContentWrapperAttribute.cs
- BufferedGraphicsManager.cs
- SqlMethods.cs