TcpStatistics.CurrentConnections Eigenschaft
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Ruft die Anzahl der aktuellen TCP (Transmission Control Protocol)-Verbindungen ab.
public:
abstract property long CurrentConnections { long get(); };
public abstract long CurrentConnections { get; }
member this.CurrentConnections : int64
Public MustOverride ReadOnly Property CurrentConnections As Long
Eigenschaftswert
Ein Int64-Wert, der die Gesamtzahl der aktuellen TCP-Verbindungen angibt.
Beispiele
Im folgenden Codebeispiel werden Verbindungsinformationen angezeigt.
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
Hinweise
IETF RFC 2012 definiert diesen Wert formell als " Die Anzahl von TCP-Verbindungen, für die der aktuelle Status entweder ESTABLISHED oder CLOSE-WAIT ist."