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
- XmlSchemaObjectTable.cs
- NonVisualControlAttribute.cs
- SecondaryViewProvider.cs
- HttpCookieCollection.cs
- MarshalByValueComponent.cs
- Emitter.cs
- RuntimeConfig.cs
- Pipe.cs
- DesignerLinkAdapter.cs
- SoapTypeAttribute.cs
- FolderBrowserDialogDesigner.cs
- ToolStripPanel.cs
- GPPOINTF.cs
- MemoryPressure.cs
- TextRunCache.cs
- ReadOnlyHierarchicalDataSourceView.cs
- SettingsBase.cs
- ComponentConverter.cs
- TcpTransportSecurity.cs
- Filter.cs
- CatalogZone.cs
- OutputWindow.cs
- ProtocolsConfigurationEntry.cs
- EntityDataReader.cs
- GridView.cs
- TextServicesDisplayAttributePropertyRanges.cs
- WindowsEditBox.cs
- LabelLiteral.cs
- ColumnResult.cs
- ObjectListGeneralPage.cs
- ToolboxDataAttribute.cs
- SoapException.cs
- SQLConvert.cs
- DataGridPagerStyle.cs
- XmlAttributeCollection.cs
- HtmlWindowCollection.cs
- DateBoldEvent.cs
- CompiledRegexRunnerFactory.cs
- WsatAdminException.cs
- ToolboxDataAttribute.cs
- DateTimeUtil.cs
- validationstate.cs
- _NetworkingPerfCounters.cs
- SingleStorage.cs
- AnonymousIdentificationModule.cs
- DynamicField.cs
- GroupDescription.cs
- ProcessingInstructionAction.cs
- ListViewGroupConverter.cs
- CodeArrayIndexerExpression.cs
- TextServicesCompartmentContext.cs
- DefaultValueTypeConverter.cs
- MetadataArtifactLoaderComposite.cs
- FileEnumerator.cs
- ConfigXmlWhitespace.cs
- PageContentAsyncResult.cs
- TileBrush.cs
- SqlFileStream.cs
- DataControlPagerLinkButton.cs
- SymLanguageType.cs
- WindowPattern.cs
- CryptographicAttribute.cs
- TypeBinaryExpression.cs
- ZoneLinkButton.cs
- ScriptIgnoreAttribute.cs
- ResizeGrip.cs
- SecurityMode.cs
- BooleanSwitch.cs
- XmlReaderSettings.cs
- SafeViewOfFileHandle.cs
- ReachFixedDocumentSerializer.cs
- mediapermission.cs
- TextParaClient.cs
- OnOperation.cs
- HtmlPhoneCallAdapter.cs
- StrokeNode.cs
- HotSpot.cs
- WindowsBrush.cs
- RadialGradientBrush.cs
- SchemaNamespaceManager.cs
- ItemsPresenter.cs
- URI.cs
- FileLoadException.cs
- Action.cs
- EventArgs.cs
- ModelItemKeyValuePair.cs
- cookiecollection.cs
- DataObjectAttribute.cs
- GeneratedCodeAttribute.cs
- QuaternionValueSerializer.cs
- TableLayoutSettings.cs
- VirtualizedItemProviderWrapper.cs
- FormCollection.cs
- AssociationEndMember.cs
- InputProviderSite.cs
- XmlSchemaType.cs
- DictionaryEntry.cs
- X509Certificate2.cs
- AsymmetricKeyExchangeDeformatter.cs
- RelatedPropertyManager.cs