Files
2026-06-04 11:42:34 +02:00

60 lines
2.4 KiB
C#

using System;
namespace System.Net.Sockets
{
/// <summary>Specifies whether a <see cref="T:System.Net.Sockets.Socket" /> will remain connected after a call to the <see cref="M:System.Net.Sockets.Socket.Close" /> or <see cref="M:System.Net.Sockets.TcpClient.Close" /> methods and the length of time it will remain connected, if data remains to be sent.</summary>
// Token: 0x020001DC RID: 476
public class LingerOption
{
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Sockets.LingerOption" /> class.</summary>
/// <param name="enable">true to remain connected after the <see cref="M:System.Net.Sockets.Socket.Close" /> method is called; otherwise, false. </param>
/// <param name="seconds">The number of seconds to remain connected after the <see cref="M:System.Net.Sockets.Socket.Close" /> method is called. </param>
// Token: 0x06000F60 RID: 3936 RVA: 0x0002A3C0 File Offset: 0x000285C0
public LingerOption(bool enable, int secs)
{
this.enabled = enable;
this.seconds = secs;
}
/// <summary>Gets or sets a value that indicates whether to linger after the <see cref="T:System.Net.Sockets.Socket" /> is closed.</summary>
/// <returns>true if the <see cref="T:System.Net.Sockets.Socket" /> should linger after <see cref="M:System.Net.Sockets.Socket.Close" /> is called; otherwise, false.</returns>
// Token: 0x17000542 RID: 1346
// (get) Token: 0x06000F61 RID: 3937 RVA: 0x0002A3D8 File Offset: 0x000285D8
// (set) Token: 0x06000F62 RID: 3938 RVA: 0x0002A3E0 File Offset: 0x000285E0
public bool Enabled
{
get
{
return this.enabled;
}
set
{
this.enabled = value;
}
}
/// <summary>Gets or sets the amount of time to remain connected after calling the <see cref="M:System.Net.Sockets.Socket.Close" /> method if data remains to be sent.</summary>
/// <returns>The amount of time, in seconds, to remain connected after calling <see cref="M:System.Net.Sockets.Socket.Close" />.</returns>
// Token: 0x17000543 RID: 1347
// (get) Token: 0x06000F63 RID: 3939 RVA: 0x0002A3EC File Offset: 0x000285EC
// (set) Token: 0x06000F64 RID: 3940 RVA: 0x0002A3F4 File Offset: 0x000285F4
public int LingerTime
{
get
{
return this.seconds;
}
set
{
this.seconds = value;
}
}
// Token: 0x04000DF8 RID: 3576
private bool enabled;
// Token: 0x04000DF9 RID: 3577
private int seconds;
}
}