TcpStatistics.CurrentConnections Properti
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Mendapatkan jumlah koneksi Protokol Kontrol Transmisi (TCP) saat ini.
public:
abstract property long CurrentConnections { long get(); };
public abstract long CurrentConnections { get; }
member this.CurrentConnections : int64
Public MustOverride ReadOnly Property CurrentConnections As Long
Nilai Properti
Nilai Int64 yang menentukan jumlah total koneksi TCP saat ini.
Contoh
Contoh kode berikut menampilkan informasi koneksi.
void ShowTcpConnectionStatistics()
{
IPGlobalProperties ^ properties = IPGlobalProperties::GetIPGlobalProperties();
TcpStatistics ^ tcpstat = properties->GetTcpIPv4Statistics();
Console::WriteLine( " Connection Data:" );
Console::WriteLine( " Current ............................ : {0}",
tcpstat->CurrentConnections );
Console::WriteLine( " Cumulative .......................... : {0}",
tcpstat->CumulativeConnections );
Console::WriteLine( " Initiated ........................... : {0}",
tcpstat->ConnectionsInitiated );
Console::WriteLine( " Accepted ............................ : {0}",
tcpstat->ConnectionsAccepted );
Console::WriteLine( " Failed Attempts ..................... : {0}",
tcpstat->FailedConnectionAttempts );
Console::WriteLine( " Reset ............................... : {0}",
tcpstat->ResetConnections );
Console::WriteLine( " Errors .............................. : {0}",
tcpstat->ErrorsReceived );
}
public static void ShowTcpConnectionStatistics()
{
IPGlobalProperties properties = IPGlobalProperties.GetIPGlobalProperties();
TcpStatistics tcpstat = properties.GetTcpIPv4Statistics();
Console.WriteLine(" Connection Data:");
Console.WriteLine(" Current ............................ : {0}",
tcpstat.CurrentConnections);
Console.WriteLine(" Cumulative .......................... : {0}",
tcpstat.CumulativeConnections);
Console.WriteLine(" Initiated ........................... : {0}",
tcpstat.ConnectionsInitiated);
Console.WriteLine(" Accepted ............................ : {0}",
tcpstat.ConnectionsAccepted);
Console.WriteLine(" Failed Attempts ..................... : {0}",
tcpstat.FailedConnectionAttempts);
Console.WriteLine(" Reset ............................... : {0}",
tcpstat.ResetConnections);
Console.WriteLine(" Errors .............................. : {0}",
tcpstat.ErrorsReceived);
Console.WriteLine();
}
Public Shared Sub ShowTcpConnectionStatistics()
Dim properties As IPGlobalProperties = IPGlobalProperties.GetIPGlobalProperties()
Dim tcpstat As TcpStatistics = properties.GetTcpIPv4Statistics()
Console.WriteLine(" Connection Data:")
Console.WriteLine(" Current ............................ : {0}", tcpstat.CurrentConnections)
Console.WriteLine(" Cumulative .......................... : {0}", tcpstat.CumulativeConnections)
Console.WriteLine(" Initiated ........................... : {0}", tcpstat.ConnectionsInitiated)
Console.WriteLine(" Accepted ............................ : {0}", tcpstat.ConnectionsAccepted)
Console.WriteLine(" Failed Attempts ..................... : {0}", tcpstat.FailedConnectionAttempts)
Console.WriteLine(" Reset ............................... : {0}", tcpstat.ResetConnections)
Console.WriteLine(" Errors .............................. : {0}", tcpstat.ErrorsReceived)
End Sub
Keterangan
IETF RFC 2012 secara resmi mendefinisikan nilai ini sebagai, "Jumlah koneksi TCP yang statusnya saat ini DITETAPKAN atau CLOSE-WAIT."
Berlaku untuk
Berkolaborasi dengan kami di GitHub
Sumber untuk konten ini dapat ditemukan di GitHub, yang juga dapat Anda gunakan untuk membuat dan meninjau masalah dan menarik permintaan. Untuk informasi selengkapnya, lihat panduan kontributor kami.