TcpStatistics Klasse

Definition

Stellt TCP (Transmission Control Protocol)-Statistikdaten bereit.

public ref class TcpStatistics abstract
public abstract class TcpStatistics
type TcpStatistics = class
Public MustInherit Class TcpStatistics
Vererbung
TcpStatistics

Beispiele

Im folgenden Codebeispiel werden die TCP-Statistiken für die angegebene Adressfamilie angezeigt.

void ShowTcpStatistics( NetworkInterfaceComponent version )
{
   IPGlobalProperties ^ properties = IPGlobalProperties::GetIPGlobalProperties();
   TcpStatistics ^ tcpstat = nullptr;
   Console::WriteLine( "" );
   switch ( version )
   {
      case NetworkInterfaceComponent::IPv4:
         tcpstat = properties->GetTcpIPv4Statistics();
         Console::WriteLine( "TCP/IPv4 Statistics:" );
         break;

      case NetworkInterfaceComponent::IPv6:
         tcpstat = properties->GetTcpIPv6Statistics();
         Console::WriteLine( "TCP/IPv6 Statistics:" );
         break;

      default:
         throw gcnew ArgumentException( "version" );
         break;
   }
   Console::WriteLine( "  Minimum Transmission Timeout............. : {0}",
      tcpstat->MinimumTransmissionTimeout );
   Console::WriteLine( "  Maximum Transmission Timeout............. : {0}",
      tcpstat->MaximumTransmissionTimeout );
   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( "" );
   Console::WriteLine( "  Segment Data:" );
   Console::WriteLine( "      Received  ........................... : {0}",
      tcpstat->SegmentsReceived );
   Console::WriteLine( "      Sent ................................ : {0}",
      tcpstat->SegmentsSent );
   Console::WriteLine( "      Retransmitted ....................... : {0}",
      tcpstat->SegmentsResent );
   Console::WriteLine( "" );
}
public static void ShowTcpStatistics(NetworkInterfaceComponent version)
{
    IPGlobalProperties properties = IPGlobalProperties.GetIPGlobalProperties();
    TcpStatistics tcpstat = null;
    Console.WriteLine("");
    switch (version)
    {
        case NetworkInterfaceComponent.IPv4:
             tcpstat = properties.GetTcpIPv4Statistics();
            Console.WriteLine("TCP/IPv4 Statistics:");
            break;
        case NetworkInterfaceComponent.IPv6:
            tcpstat = properties.GetTcpIPv6Statistics();
            Console.WriteLine("TCP/IPv6 Statistics:");
            break;
        default:
            throw new ArgumentException("version");
        //    break;
    }
    Console.WriteLine("  Minimum Transmission Timeout............. : {0}",
        tcpstat.MinimumTransmissionTimeout);
    Console.WriteLine("  Maximum Transmission Timeout............. : {0}",
        tcpstat.MaximumTransmissionTimeout);

    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("");
    Console.WriteLine("  Segment Data:");
    Console.WriteLine("      Received  ........................... : {0}",
        tcpstat.SegmentsReceived);
    Console.WriteLine("      Sent ................................ : {0}",
        tcpstat.SegmentsSent);
    Console.WriteLine("      Retransmitted ....................... : {0}",
        tcpstat.SegmentsResent);

    Console.WriteLine("");
}

Hinweise

Instanzen dieser Klasse werden von den GetTcpIPv4Statistics Methoden und GetTcpIPv6Statistics Methoden zurückgegeben, um Anwendungen Zugriff auf TCP-Datenverkehrsinformationen zu gewähren.

Die Informationen in dieser Klasse korrelieren mit den in beschriebenen Verwaltungsinformationsobjekten https://www.ietf.org/rfc/rfc2012.txt.

Konstruktoren

TcpStatistics()

Initialisiert eine neue Instanz der TcpStatistics-Klasse.

Eigenschaften

ConnectionsAccepted

Ruft die Anzahl der angenommenen TCP (Transmission Control Protocol)-Verbindungsanforderungen ab.

ConnectionsInitiated

Ruft die Anzahl der von Clients ausgeführten TCP (Transmission Control Protocol)-Verbindungsanforderungen ab.

CumulativeConnections

Gibt die Gesamtzahl der hergestellten TCP (Transmission Control Protocol)-Verbindungen an.

CurrentConnections

Ruft die Anzahl der aktuellen TCP (Transmission Control Protocol)-Verbindungen ab.

ErrorsReceived

Ruft die Anzahl der empfangenen TCP (Transmission Control Protocol)-Fehler ab.

FailedConnectionAttempts

Ruft die Anzahl der fehlgeschlagenen TCP (Transmission Control Protocol)-Verbindungsversuche ab.

MaximumConnections

Ruft die maximale Anzahl unterstützter TCP (Transmission Control Protocol)-Verbindungen ab.

MaximumTransmissionTimeout

Ruft den maximalen Timeoutwert für Neuübertragungen für TCP (Transmission Control Protocol)-Segmente ab.

MinimumTransmissionTimeout

Ruft den minimalen Timeoutwert für Neuübertragungen für TCP (Transmission Control Protocol)-Segmente ab.

ResetConnections

Ruft die Anzahl der über TCP (Transmission Control Protocol)-Verbindungen empfangenen RST-Pakete ab.

ResetsSent

Ruft die Anzahl der mit festgelegtem Reset-Flag gesendeten TCP (Transmission Control Protocol)-Segmente ab.

SegmentsReceived

Ruft die Anzahl der empfangenen TCP (Transmission Control Protocol)-Segmente ab.

SegmentsResent

Ruft die Anzahl der erneut gesendeten TCP (Transmission Control Protocol)-Segmente ab.

SegmentsSent

Ruft die Anzahl der gesendeten TCP (Transmission Control Protocol)-Segmente ab.

Methoden

Equals(Object)

Bestimmt, ob das angegebene Objekt gleich dem aktuellen Objekt ist.

(Geerbt von Object)
GetHashCode()

Fungiert als Standardhashfunktion.

(Geerbt von Object)
GetType()

Ruft den Type der aktuellen Instanz ab.

(Geerbt von Object)
MemberwiseClone()

Erstellt eine flache Kopie des aktuellen Object.

(Geerbt von Object)
ToString()

Gibt eine Zeichenfolge zurück, die das aktuelle Objekt darstellt.

(Geerbt von Object)

Gilt für