TcpStatistics.FailedConnectionAttempts 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 upaya koneksi Protokol Kontrol Transmisi (TCP) yang gagal.
public:
abstract property long FailedConnectionAttempts { long get(); };
public abstract long FailedConnectionAttempts { get; }
member this.FailedConnectionAttempts : int64
Public MustOverride ReadOnly Property FailedConnectionAttempts As Long
Nilai Properti
Nilai Int64 yang menentukan jumlah total upaya koneksi TCP yang gagal.
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, "Berapa kali koneksi TCP telah melakukan transisi langsung ke status CLOSED dari status SYN-SENT atau status SYN-RCVD, ditambah berapa kali koneksi TCP telah melakukan transisi langsung ke status LISTEN dari status SYN-RCVD."