Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- activationcontext.cs
- PropertyGridEditorPart.cs
- HeaderedContentControl.cs
- CharacterMetricsDictionary.cs
- ListViewPagedDataSource.cs
- ThicknessAnimationUsingKeyFrames.cs
- DeferredElementTreeState.cs
- TaiwanCalendar.cs
- XmlReaderDelegator.cs
- EdmError.cs
- TransactionCache.cs
- XmlWhitespace.cs
- TextBreakpoint.cs
- PersistenceProviderElement.cs
- FormsAuthenticationUser.cs
- InternalConfigSettingsFactory.cs
- ScriptDescriptor.cs
- UIntPtr.cs
- IdleTimeoutMonitor.cs
- MappingItemCollection.cs
- SoapEnumAttribute.cs
- DataViewManager.cs
- ContentElement.cs
- DynamicMetaObject.cs
- _ListenerRequestStream.cs
- HebrewNumber.cs
- DecoratedNameAttribute.cs
- ClientCultureInfo.cs
- CommandDevice.cs
- HostingPreferredMapPath.cs
- PropertyToken.cs
- TagPrefixInfo.cs
- NgenServicingAttributes.cs
- SymDocumentType.cs
- DesignerRegion.cs
- FixedSOMPageConstructor.cs
- ModelItemKeyValuePair.cs
- XmlUtilWriter.cs
- TemplateBamlRecordReader.cs
- ObjectNavigationPropertyMapping.cs
- ObjectAssociationEndMapping.cs
- DataServiceQueryException.cs
- FormViewUpdatedEventArgs.cs
- VersionedStreamOwner.cs
- HighContrastHelper.cs
- BuildProvider.cs
- rsa.cs
- FieldToken.cs
- ImageListUtils.cs
- InvalidStoreProtectionKeyException.cs
- XmlEncodedRawTextWriter.cs
- UIElementParaClient.cs
- OleDbErrorCollection.cs
- CodeThrowExceptionStatement.cs
- ModifierKeysValueSerializer.cs
- ColumnWidthChangingEvent.cs
- TextRangeEditTables.cs
- LinkedResource.cs
- XhtmlStyleClass.cs
- DbConnectionClosed.cs
- ParsedAttributeCollection.cs
- AsyncOperationManager.cs
- PopupRoot.cs
- SynchronizationLockException.cs
- RefreshPropertiesAttribute.cs
- ObjectDataSourceChooseMethodsPanel.cs
- ReaderOutput.cs
- DataGridViewCellConverter.cs
- ToolStripItemBehavior.cs
- TypeUtil.cs
- TextDecorationCollectionConverter.cs
- RegistrationServices.cs
- WebPartAuthorizationEventArgs.cs
- Int16Animation.cs
- FieldNameLookup.cs
- Encoder.cs
- LinqDataSourceInsertEventArgs.cs
- HttpModuleAction.cs
- WeakReferenceKey.cs
- InputLanguageCollection.cs
- SemaphoreSecurity.cs
- xml.cs
- ContentPosition.cs
- VersionPair.cs
- XmlDictionary.cs
- WebDisplayNameAttribute.cs
- Int16Animation.cs
- ObservableDictionary.cs
- _ProxyRegBlob.cs
- DataConnectionHelper.cs
- HtmlTableRowCollection.cs
- ControlAdapter.cs
- DrawingContextDrawingContextWalker.cs
- ComboBox.cs
- RectAnimationClockResource.cs
- AQNBuilder.cs
- Point3D.cs
- MouseActionConverter.cs
- RelatedView.cs
- PointUtil.cs