73 lines
2.9 KiB
C#
73 lines
2.9 KiB
C#
using System;
|
|
|
|
namespace System.Net.NetworkInformation
|
|
{
|
|
/// <summary>Used to control how <see cref="T:System.Net.NetworkInformation.Ping" /> data packets are transmitted.</summary>
|
|
// Token: 0x020001B1 RID: 433
|
|
public class PingOptions
|
|
{
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.Net.NetworkInformation.PingOptions" /> class.</summary>
|
|
// Token: 0x06000E5B RID: 3675 RVA: 0x00028E7C File Offset: 0x0002707C
|
|
public PingOptions()
|
|
{
|
|
}
|
|
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.Net.NetworkInformation.PingOptions" /> class and sets the Time to Live and fragmentation values.</summary>
|
|
/// <param name="ttl">An <see cref="T:System.Int32" /> value greater than zero that specifies the number of times that the <see cref="T:System.Net.NetworkInformation.Ping" /> data packets can be forwarded.</param>
|
|
/// <param name="dontFragment">true to prevent data sent to the remote host from being fragmented; otherwise, false.</param>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
|
/// <paramref name="ttl " />is less than or equal to zero.</exception>
|
|
// Token: 0x06000E5C RID: 3676 RVA: 0x00028E90 File Offset: 0x00027090
|
|
public PingOptions(int ttl, bool dontFragment)
|
|
{
|
|
if (ttl <= 0)
|
|
{
|
|
throw new ArgumentOutOfRangeException("Must be greater than zero.", "ttl");
|
|
}
|
|
this.ttl = ttl;
|
|
this.dont_fragment = dontFragment;
|
|
}
|
|
|
|
/// <summary>Gets or sets a <see cref="T:System.Boolean" /> value that controls fragmentation of the data sent to the remote host.</summary>
|
|
/// <returns>true if the data cannot be sent in multiple packets; otherwise false. The default is false.</returns>
|
|
// Token: 0x170004A6 RID: 1190
|
|
// (get) Token: 0x06000E5D RID: 3677 RVA: 0x00028ED4 File Offset: 0x000270D4
|
|
// (set) Token: 0x06000E5E RID: 3678 RVA: 0x00028EDC File Offset: 0x000270DC
|
|
public bool DontFragment
|
|
{
|
|
get
|
|
{
|
|
return this.dont_fragment;
|
|
}
|
|
set
|
|
{
|
|
this.dont_fragment = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets or sets the number of routing nodes that can forward the <see cref="T:System.Net.NetworkInformation.Ping" /> data before it is discarded.</summary>
|
|
/// <returns>An <see cref="T:System.Int32" /> value that specifies the number of times the <see cref="T:System.Net.NetworkInformation.Ping" /> data packets can be forwarded. The default is 128.</returns>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">The value specified for a set operation is less than or equal to zero.</exception>
|
|
// Token: 0x170004A7 RID: 1191
|
|
// (get) Token: 0x06000E5F RID: 3679 RVA: 0x00028EE8 File Offset: 0x000270E8
|
|
// (set) Token: 0x06000E60 RID: 3680 RVA: 0x00028EF0 File Offset: 0x000270F0
|
|
public int Ttl
|
|
{
|
|
get
|
|
{
|
|
return this.ttl;
|
|
}
|
|
set
|
|
{
|
|
this.ttl = value;
|
|
}
|
|
}
|
|
|
|
// Token: 0x04000CE4 RID: 3300
|
|
private int ttl = 128;
|
|
|
|
// Token: 0x04000CE5 RID: 3301
|
|
private bool dont_fragment;
|
|
}
|
|
}
|