Bagikan melalui


TcpStatistics.MaximumConnections Properti

Definisi

Mendapatkan jumlah maksimum koneksi Protokol Kendali Transmisi (TCP) yang didukung.

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

Nilai Properti

Nilai Int64 yang menentukan jumlah total koneksi TCP yang dapat didukung.

Contoh

Contoh kode berikut menampilkan waktu habis dan informasi koneksi maksimum.

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

Keterangan

Jika jumlah maksimum koneksi dinamis, properti ini mengembalikan -1.

Berlaku untuk