Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- ResXFileRef.cs
- ToolStripDropDownMenu.cs
- AsyncOperation.cs
- TimeIntervalCollection.cs
- EmptyControlCollection.cs
- SimpleType.cs
- GetWinFXPath.cs
- ControlBuilderAttribute.cs
- SafeProcessHandle.cs
- Tuple.cs
- SystemDiagnosticsSection.cs
- DaylightTime.cs
- recordstatescratchpad.cs
- TableLayoutStyleCollection.cs
- SafeHandles.cs
- AssemblyBuilder.cs
- WinOEToolBoxItem.cs
- EdmComplexPropertyAttribute.cs
- TextBoxDesigner.cs
- SequenceNumber.cs
- ValuePattern.cs
- RangeValidator.cs
- wgx_exports.cs
- SqlTopReducer.cs
- DiscreteKeyFrames.cs
- ReferentialConstraint.cs
- InputMethodStateTypeInfo.cs
- SnapLine.cs
- WCFBuildProvider.cs
- StateRuntime.cs
- UrlPath.cs
- TableLayoutColumnStyleCollection.cs
- RowUpdatingEventArgs.cs
- LinkClickEvent.cs
- control.ime.cs
- ToolStripManager.cs
- TheQuery.cs
- SocketElement.cs
- AttachedAnnotation.cs
- DecoderReplacementFallback.cs
- XmlChoiceIdentifierAttribute.cs
- PopupControlService.cs
- mediaclock.cs
- CompositionAdorner.cs
- DataServiceProviderWrapper.cs
- OSFeature.cs
- DefaultWorkflowLoaderService.cs
- URL.cs
- PersonalizationStateQuery.cs
- ConstructorBuilder.cs
- EntityCollection.cs
- EventLogPermission.cs
- NodeFunctions.cs
- FileNotFoundException.cs
- DelegatingConfigHost.cs
- MultilineStringConverter.cs
- COM2FontConverter.cs
- ComponentEvent.cs
- PartialClassGenerationTask.cs
- XmlSignatureProperties.cs
- XmlSerializationReader.cs
- BuildProvider.cs
- TypeSystemHelpers.cs
- DocumentOutline.cs
- XmlAttribute.cs
- XmlNodeChangedEventArgs.cs
- ClientConfigPaths.cs
- CatalogPartCollection.cs
- ProxyWebPart.cs
- ChooseAction.cs
- RemotingService.cs
- DynamicMethod.cs
- ColumnReorderedEventArgs.cs
- ZoneMembershipCondition.cs
- TreeNodeCollection.cs
- OracleParameterBinding.cs
- JournalNavigationScope.cs
- HttpCachePolicy.cs
- SimpleTypesSurrogate.cs
- SerializationObjectManager.cs
- TypeInitializationException.cs
- XmlDataDocument.cs
- AttachedPropertyBrowsableAttribute.cs
- ProfileProvider.cs
- SqlIdentifier.cs
- BoundColumn.cs
- ChannelSinkStacks.cs
- Converter.cs
- MonthCalendarDesigner.cs
- XmlDataSourceNodeDescriptor.cs
- HashCoreRequest.cs
- ValueTable.cs
- ComponentEvent.cs
- SafeArrayRankMismatchException.cs
- PersonalizationStateInfo.cs
- GridViewCancelEditEventArgs.cs
- LicenseManager.cs
- ClientBuildManagerCallback.cs
- ControlPropertyNameConverter.cs
- GridItemCollection.cs