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
- Invariant.cs
- Utils.cs
- SimpleType.cs
- ProfileProvider.cs
- _SSPISessionCache.cs
- DomNameTable.cs
- EditorZone.cs
- FastEncoderWindow.cs
- Literal.cs
- AssertHelper.cs
- ScopelessEnumAttribute.cs
- GetPageCompletedEventArgs.cs
- DataContractSerializerOperationGenerator.cs
- ActivationServices.cs
- XDeferredAxisSource.cs
- GenericTextProperties.cs
- Menu.cs
- HebrewNumber.cs
- StylusPointPropertyInfoDefaults.cs
- TreeNodeConverter.cs
- CqlBlock.cs
- XamlTreeBuilder.cs
- DataGridViewCellEventArgs.cs
- IntSumAggregationOperator.cs
- ProtocolsConfigurationHandler.cs
- FrugalMap.cs
- FieldDescriptor.cs
- StrokeNodeEnumerator.cs
- LinkLabel.cs
- documentsequencetextview.cs
- FixedSOMPageConstructor.cs
- EngineSiteSapi.cs
- ReservationCollection.cs
- Compilation.cs
- FontConverter.cs
- ScrollProviderWrapper.cs
- UITypeEditor.cs
- ValidationRuleCollection.cs
- XmlNodeChangedEventArgs.cs
- DynamicArgumentDesigner.xaml.cs
- ImageFormatConverter.cs
- Command.cs
- FlowDocumentFormatter.cs
- TableLayoutSettingsTypeConverter.cs
- NetDataContractSerializer.cs
- VideoDrawing.cs
- GeneralTransform2DTo3DTo2D.cs
- ActivityMarkupSerializationProvider.cs
- ReferenceService.cs
- ECDsaCng.cs
- SessionStateUtil.cs
- SafeEventLogReadHandle.cs
- Document.cs
- SettingsContext.cs
- _NegoState.cs
- TextElementCollectionHelper.cs
- DataGridViewColumnCollectionEditor.cs
- MappingSource.cs
- ConfigXmlWhitespace.cs
- SettingsPropertyValueCollection.cs
- Wildcard.cs
- WebPartConnectVerb.cs
- MetricEntry.cs
- DataSourceXmlClassAttribute.cs
- PopupRoot.cs
- XmlSchemaInfo.cs
- CompiledRegexRunnerFactory.cs
- CustomCredentialPolicy.cs
- AlternateView.cs
- WpfKnownMemberInvoker.cs
- Ref.cs
- SqlDataSourceStatusEventArgs.cs
- OutOfProcStateClientManager.cs
- DbConnectionStringBuilder.cs
- WmlObjectListAdapter.cs
- WebPartUserCapability.cs
- ItemCollection.cs
- Label.cs
- CompilerResults.cs
- TabItemAutomationPeer.cs
- DesignTimeParseData.cs
- DbMetaDataCollectionNames.cs
- IDictionary.cs
- TextModifier.cs
- PersonalizationEntry.cs
- CharEntityEncoderFallback.cs
- HtmlElement.cs
- PageClientProxyGenerator.cs
- ConstraintConverter.cs
- QueryUtil.cs
- XamlReaderConstants.cs
- CodeIndexerExpression.cs
- Marshal.cs
- DictionaryEntry.cs
- versioninfo.cs
- WebPartTransformer.cs
- RawTextInputReport.cs
- ContainerFilterService.cs
- GridViewSortEventArgs.cs
- EntityTransaction.cs