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
- OletxResourceManager.cs
- VirtualizingStackPanel.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- messageonlyhwndwrapper.cs
- FileChangesMonitor.cs
- __Filters.cs
- HttpPostLocalhostServerProtocol.cs
- GridViewCancelEditEventArgs.cs
- EntityDataSource.cs
- XPathNavigator.cs
- TabRenderer.cs
- CodeTypeReference.cs
- CharKeyFrameCollection.cs
- JournalEntryListConverter.cs
- LinkedResource.cs
- LinqDataSourceView.cs
- Nullable.cs
- SqlNodeTypeOperators.cs
- TableCell.cs
- ToolStripItemClickedEventArgs.cs
- VirtualPathProvider.cs
- RbTree.cs
- ControlIdConverter.cs
- SystemException.cs
- ErrorFormatterPage.cs
- ActivitiesCollection.cs
- ColorKeyFrameCollection.cs
- DataGridViewColumnHeaderCell.cs
- XamlTypeMapper.cs
- DocumentOrderComparer.cs
- ReaderOutput.cs
- PerfCounters.cs
- LZCodec.cs
- TemplatePagerField.cs
- WebBaseEventKeyComparer.cs
- MobileTextWriter.cs
- WebPartDescription.cs
- WebPartsPersonalization.cs
- DataSourceProvider.cs
- OleDbStruct.cs
- _CacheStreams.cs
- GroupItem.cs
- HttpHeaderCollection.cs
- UndirectedGraph.cs
- EntityDataSourceReferenceGroup.cs
- ListCollectionView.cs
- ToolbarAUtomationPeer.cs
- DATA_BLOB.cs
- validation.cs
- VirtualPath.cs
- StylusCaptureWithinProperty.cs
- GridLengthConverter.cs
- DoubleAnimation.cs
- HttpException.cs
- DependencyPropertyConverter.cs
- FontDriver.cs
- CLSCompliantAttribute.cs
- DataGridViewTextBoxEditingControl.cs
- CodeGroup.cs
- TextBoxAutoCompleteSourceConverter.cs
- ErrorRuntimeConfig.cs
- Site.cs
- HttpProcessUtility.cs
- OleTxTransaction.cs
- SerialPinChanges.cs
- PackWebRequest.cs
- CqlLexer.cs
- EntityContainerEmitter.cs
- ExternalCalls.cs
- XPathNodeIterator.cs
- PrefixQName.cs
- TraceInternal.cs
- DataControlLinkButton.cs
- WinInet.cs
- CompilationLock.cs
- LayoutEditorPart.cs
- AlternateView.cs
- MachineKeyConverter.cs
- ObjectViewListener.cs
- Site.cs
- ConfigurationStrings.cs
- TraceListeners.cs
- CompensatableTransactionScopeActivityDesigner.cs
- TriggerBase.cs
- ReplacementText.cs
- DependencyObjectPropertyDescriptor.cs
- LineProperties.cs
- MemoryRecordBuffer.cs
- PersonalizationState.cs
- LocalizedNameDescriptionPair.cs
- ProcessInputEventArgs.cs
- TypeToTreeConverter.cs
- SHA512.cs
- _MultipleConnectAsync.cs
- ObjectQueryExecutionPlan.cs
- ConnectionManagementSection.cs
- BinaryWriter.cs
- SendingRequestEventArgs.cs
- WizardSideBarListControlItemEventArgs.cs
- CultureSpecificCharacterBufferRange.cs