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
- DesignBindingPicker.cs
- HTMLTagNameToTypeMapper.cs
- PropertyGridEditorPart.cs
- __FastResourceComparer.cs
- AbstractSvcMapFileLoader.cs
- QueryConverter.cs
- Trace.cs
- WriteTimeStream.cs
- NavigationProperty.cs
- ExtensibleClassFactory.cs
- CompilerTypeWithParams.cs
- ConstraintConverter.cs
- Error.cs
- InputScopeNameConverter.cs
- MaskedTextBox.cs
- XmlNode.cs
- WebServiceEnumData.cs
- ActiveXHost.cs
- DictionarySectionHandler.cs
- ElementUtil.cs
- HorizontalAlignConverter.cs
- ServiceModelSectionGroup.cs
- EventsTab.cs
- AssociationTypeEmitter.cs
- AccessorTable.cs
- UniqueEventHelper.cs
- ProviderException.cs
- StorageRoot.cs
- X509PeerCertificateAuthenticationElement.cs
- CapabilitiesAssignment.cs
- KeyManager.cs
- HtmlControl.cs
- WSSecurityPolicy.cs
- ControlCachePolicy.cs
- SqlResolver.cs
- Helpers.cs
- ComponentCodeDomSerializer.cs
- XXXOnTypeBuilderInstantiation.cs
- QuotedPrintableStream.cs
- DetailsView.cs
- TypedReference.cs
- MultipartContentParser.cs
- DateTimeOffsetStorage.cs
- HttpCookiesSection.cs
- wmiprovider.cs
- XmlCollation.cs
- SourceFileBuildProvider.cs
- ErrorWrapper.cs
- CodeGenerationManager.cs
- PerformanceCounterNameAttribute.cs
- PngBitmapDecoder.cs
- Section.cs
- ValidateNames.cs
- WindowsScrollBar.cs
- AppDomainProtocolHandler.cs
- SafeLocalMemHandle.cs
- TrimSurroundingWhitespaceAttribute.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- activationcontext.cs
- WorkflowServiceAttributes.cs
- WindowsListViewItemStartMenu.cs
- GPPOINT.cs
- AudioFormatConverter.cs
- Vector3D.cs
- EastAsianLunisolarCalendar.cs
- ToolboxDataAttribute.cs
- XamlReader.cs
- FileDialogCustomPlaces.cs
- FontStretchConverter.cs
- ToolBarTray.cs
- PageCodeDomTreeGenerator.cs
- FormView.cs
- Serializer.cs
- PreviewKeyDownEventArgs.cs
- ResourcesBuildProvider.cs
- MarshalByRefObject.cs
- ContentValidator.cs
- GifBitmapEncoder.cs
- RootNamespaceAttribute.cs
- PlatformCulture.cs
- Transaction.cs
- DataSourceDescriptorCollection.cs
- _RegBlobWebProxyDataBuilder.cs
- LayoutEvent.cs
- ListChangedEventArgs.cs
- PrivilegedConfigurationManager.cs
- Table.cs
- DeferredReference.cs
- HotSpot.cs
- EventLogInternal.cs
- FormViewModeEventArgs.cs
- MimeXmlImporter.cs
- XmlSerializerNamespaces.cs
- OciHandle.cs
- ThemeDirectoryCompiler.cs
- ToolStripSeparatorRenderEventArgs.cs
- Image.cs
- TableParaClient.cs
- HwndHost.cs
- ForeignKeyConstraint.cs