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
- EntityDataSourceQueryBuilder.cs
- Sentence.cs
- VisualStyleTypesAndProperties.cs
- PointAnimationClockResource.cs
- XPathArrayIterator.cs
- Authorization.cs
- CompiledELinqQueryState.cs
- Graphics.cs
- Rotation3DAnimationBase.cs
- EventToken.cs
- MultipartIdentifier.cs
- StickyNoteContentControl.cs
- UnsignedPublishLicense.cs
- ColumnReorderedEventArgs.cs
- EpmSyndicationContentDeSerializer.cs
- SerializableAttribute.cs
- PersonalizablePropertyEntry.cs
- FunctionGenerator.cs
- GeometryHitTestParameters.cs
- Line.cs
- GeneralTransformGroup.cs
- ResolveCriteriaApril2005.cs
- EmptyTextWriter.cs
- VScrollBar.cs
- Error.cs
- SpellerInterop.cs
- SchemaManager.cs
- CommandHelper.cs
- TcpServerChannel.cs
- MemberDescriptor.cs
- EncodingTable.cs
- WebPartVerb.cs
- HttpCookiesSection.cs
- SoapEnumAttribute.cs
- MessageSecurityProtocolFactory.cs
- ListDictionary.cs
- MatrixAnimationUsingPath.cs
- BamlRecords.cs
- XmlSerializer.cs
- FlowDocumentPage.cs
- TextRangeBase.cs
- Row.cs
- X509RecipientCertificateClientElement.cs
- CharConverter.cs
- XmlSchemaGroupRef.cs
- WebPartTransformer.cs
- XmlCharacterData.cs
- AdapterUtil.cs
- LinkedResource.cs
- DeviceContexts.cs
- LogicalExpressionTypeConverter.cs
- HashStream.cs
- HtmlControlAdapter.cs
- DeflateEmulationStream.cs
- MetadataItemEmitter.cs
- ConfigurationException.cs
- StringDictionary.cs
- StateItem.cs
- NumericUpDownAcceleration.cs
- AddInActivator.cs
- RecordsAffectedEventArgs.cs
- HtmlEncodedRawTextWriter.cs
- UserControlParser.cs
- InstallerTypeAttribute.cs
- WindowsFormsHostAutomationPeer.cs
- WizardForm.cs
- GlobalEventManager.cs
- VectorKeyFrameCollection.cs
- DataObjectMethodAttribute.cs
- BinaryObjectInfo.cs
- Calendar.cs
- ModulesEntry.cs
- RightNameExpirationInfoPair.cs
- ServiceDescriptionReflector.cs
- EdmProviderManifest.cs
- ContractMethodInfo.cs
- TextEditorSelection.cs
- DebugTracing.cs
- TableRow.cs
- MetadataWorkspace.cs
- MetadataArtifactLoaderComposite.cs
- _ShellExpression.cs
- URLAttribute.cs
- MediaTimeline.cs
- ContextMenu.cs
- PointValueSerializer.cs
- TargetControlTypeAttribute.cs
- DynamicValueConverter.cs
- ShaderRenderModeValidation.cs
- TableLayoutStyle.cs
- BamlTreeUpdater.cs
- WebColorConverter.cs
- CrossContextChannel.cs
- ObjectContextServiceProvider.cs
- DataBinder.cs
- ExceptionValidationRule.cs
- CompareValidator.cs
- Html32TextWriter.cs
- InheritanceAttribute.cs
- TabControl.cs