TcpStatistics.MaximumTransmissionTimeout 属性

定义

获取传输控制协议 (TCP) 段的最大重新传输超时值。

public:
 abstract property long MaximumTransmissionTimeout { long get(); };
public abstract long MaximumTransmissionTimeout { get; }
member this.MaximumTransmissionTimeout : int64
Public MustOverride ReadOnly Property MaximumTransmissionTimeout As Long

属性值

一个 Int64 值,指定 TCP 实现允许的重新传输超时值的最大毫秒数。

示例

下面的代码示例显示超时和最大连接信息。

void ShowTcpTimeouts()
{
   IPGlobalProperties ^ properties = IPGlobalProperties::GetIPGlobalProperties();
   TcpStatistics ^ tcpstat = properties->GetTcpIPv4Statistics();
   Console::WriteLine( "  Minimum Transmission Timeout............. : {0}", 
      tcpstat->MinimumTransmissionTimeout );
   Console::WriteLine( "  Maximum Transmission Timeout............. : {0}", 
      tcpstat->MaximumTransmissionTimeout );
   Console::WriteLine( "  Maximum connections ............. : {0}", 
      tcpstat->MaximumConnections );
}
public static void ShowTcpTimeouts()
{
    IPGlobalProperties properties = IPGlobalProperties.GetIPGlobalProperties();
    TcpStatistics tcpstat = properties.GetTcpIPv4Statistics();

    Console.WriteLine("  Minimum Transmission Timeout............. : {0}",
        tcpstat.MinimumTransmissionTimeout);
    Console.WriteLine("  Maximum Transmission Timeout............. : {0}",
        tcpstat.MaximumTransmissionTimeout);
    Console.WriteLine("  Maximum connections ............. : {0}",
        tcpstat.MaximumConnections);
    Console.WriteLine();
}
Public Shared Sub ShowTcpTimeouts() 
    Dim properties As IPGlobalProperties = IPGlobalProperties.GetIPGlobalProperties()
    Dim tcpstat As TcpStatistics = properties.GetTcpIPv4Statistics()
    
    Console.WriteLine("  Minimum Transmission Timeout............. : {0}", tcpstat.MinimumTransmissionTimeout)
    Console.WriteLine("  Maximum Transmission Timeout............. : {0}", tcpstat.MaximumTransmissionTimeout)
    Console.WriteLine("  Maximum connections ............. : {0}", tcpstat.MaximumConnections)

End Sub

注解

当每个出站段传递到网络层 (IP) 时,TCP 将启动重新传输计时器。 如果在计时器过期之前未收到段中的数据的确认,则会重新传输段。 计时器可以设置为值与MaximumTransmissionTimeout值之间的MinimumTransmissionTimeout任何值。

适用于