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
- TreeViewHitTestInfo.cs
- RubberbandSelector.cs
- XamlTreeBuilderBamlRecordWriter.cs
- WindowsTokenRoleProvider.cs
- SiteMembershipCondition.cs
- DataGridItemEventArgs.cs
- InstanceContextManager.cs
- FormViewCommandEventArgs.cs
- CommandArguments.cs
- PeerInvitationResponse.cs
- NameValueCache.cs
- TcpClientSocketManager.cs
- CharacterMetricsDictionary.cs
- FirstQueryOperator.cs
- ContainerVisual.cs
- DefinitionBase.cs
- Stylesheet.cs
- Compress.cs
- AnnotationStore.cs
- Message.cs
- BamlLocalizationDictionary.cs
- RectangleGeometry.cs
- XmlElementAttribute.cs
- MetadataSource.cs
- ListViewItem.cs
- CellTreeNodeVisitors.cs
- WindowPattern.cs
- RegisterInfo.cs
- CustomLineCap.cs
- EnumBuilder.cs
- VarRemapper.cs
- ImportOptions.cs
- IntegerValidatorAttribute.cs
- ListDictionaryInternal.cs
- OrderedDictionary.cs
- CleanUpVirtualizedItemEventArgs.cs
- Atom10FormatterFactory.cs
- CancellationHandlerDesigner.cs
- StronglyTypedResourceBuilder.cs
- COM2FontConverter.cs
- ValidationResult.cs
- DataGridPageChangedEventArgs.cs
- X509ServiceCertificateAuthentication.cs
- RegularExpressionValidator.cs
- FixedDocumentPaginator.cs
- _ConnectStream.cs
- ForwardPositionQuery.cs
- XPathNodeList.cs
- DrawingContextDrawingContextWalker.cs
- ServiceHttpHandlerFactory.cs
- Compiler.cs
- SQLConvert.cs
- QilGenerator.cs
- ResourcePool.cs
- ValidatingReaderNodeData.cs
- ComboBox.cs
- IpcServerChannel.cs
- BamlTreeNode.cs
- DocumentReferenceCollection.cs
- DataGridViewRowPrePaintEventArgs.cs
- HierarchicalDataBoundControlAdapter.cs
- XmlHierarchicalDataSourceView.cs
- TemplateXamlTreeBuilder.cs
- WebRequest.cs
- CommandSet.cs
- XsdDuration.cs
- WindowsTokenRoleProvider.cs
- WebPartManagerDesigner.cs
- EntityConnection.cs
- AnchorEditor.cs
- AsyncCallback.cs
- WriteableBitmap.cs
- FormParameter.cs
- ComponentConverter.cs
- MetadataCache.cs
- FormViewPageEventArgs.cs
- PreloadHost.cs
- CodeParameterDeclarationExpression.cs
- ServiceModelSectionGroup.cs
- HttpResponseMessageProperty.cs
- PackageStore.cs
- PresentationAppDomainManager.cs
- DependentTransaction.cs
- Assembly.cs
- PropertyDescriptorCollection.cs
- HtmlImage.cs
- DispatchChannelSink.cs
- KnownColorTable.cs
- MarshalByValueComponent.cs
- HttpListenerException.cs
- StringCollectionEditor.cs
- WeakReferenceKey.cs
- SqlCacheDependencyDatabaseCollection.cs
- ManipulationVelocities.cs
- TrustManagerMoreInformation.cs
- TextEditorThreadLocalStore.cs
- PartialToken.cs
- SR.cs
- ThemeDirectoryCompiler.cs
- UpdateProgress.cs