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
- SemaphoreSecurity.cs
- AggregateNode.cs
- AutomationPropertyInfo.cs
- IgnoreSectionHandler.cs
- StorageInfo.cs
- SafeUserTokenHandle.cs
- IgnoreSectionHandler.cs
- FastEncoderWindow.cs
- HttpHandler.cs
- DesignerForm.cs
- SqlServices.cs
- IdentityReference.cs
- SynchronizationLockException.cs
- Utils.cs
- ContentElementAutomationPeer.cs
- CompositionAdorner.cs
- LookupNode.cs
- DnsEndPoint.cs
- glyphs.cs
- MenuItemStyleCollection.cs
- TextProperties.cs
- SpnEndpointIdentityExtension.cs
- RowBinding.cs
- WindowsUserNameSecurityTokenAuthenticator.cs
- TrackPointCollection.cs
- LinearGradientBrush.cs
- NullRuntimeConfig.cs
- ImageInfo.cs
- RawAppCommandInputReport.cs
- XPathAncestorQuery.cs
- IndentedWriter.cs
- objectresult_tresulttype.cs
- DataServiceClientException.cs
- AuthenticatedStream.cs
- ISFTagAndGuidCache.cs
- SslStream.cs
- ErrorRuntimeConfig.cs
- InputDevice.cs
- AsyncOperationManager.cs
- CssClassPropertyAttribute.cs
- TemplatedMailWebEventProvider.cs
- ClaimSet.cs
- PublisherIdentityPermission.cs
- ScriptingScriptResourceHandlerSection.cs
- WebPartEditorApplyVerb.cs
- newitemfactory.cs
- DependencyProperty.cs
- DataView.cs
- IndicCharClassifier.cs
- TextDecoration.cs
- EmptyEnumerator.cs
- DoubleLinkListEnumerator.cs
- handlecollector.cs
- x509store.cs
- HandlerMappingMemo.cs
- ImageSourceValueSerializer.cs
- WebPartExportVerb.cs
- ZipIOModeEnforcingStream.cs
- TcpStreams.cs
- MatrixUtil.cs
- ConfigurationValues.cs
- MessageContractImporter.cs
- SerializationInfoEnumerator.cs
- FrameworkContentElement.cs
- WebEventTraceProvider.cs
- MimeTypeAttribute.cs
- CheckBoxBaseAdapter.cs
- QilReplaceVisitor.cs
- TextServicesLoader.cs
- CmsUtils.cs
- CompositeTypefaceMetrics.cs
- BrowserDefinition.cs
- TCPClient.cs
- ClientSideQueueItem.cs
- errorpatternmatcher.cs
- TableLayoutCellPaintEventArgs.cs
- ColumnClickEvent.cs
- Pen.cs
- NumberSubstitution.cs
- FormViewDeleteEventArgs.cs
- FilteredAttributeCollection.cs
- Int32Storage.cs
- EmissiveMaterial.cs
- AmbientProperties.cs
- Decimal.cs
- EnglishPluralizationService.cs
- TreeNodeMouseHoverEvent.cs
- WinEventQueueItem.cs
- DataServices.cs
- CommonGetThemePartSize.cs
- _Semaphore.cs
- BufferCache.cs
- ALinqExpressionVisitor.cs
- CustomWebEventKey.cs
- BitConverter.cs
- TextBoxBase.cs
- FontDifferentiator.cs
- WebPartTransformerAttribute.cs
- ValueExpressions.cs
- TextProperties.cs