TcpStatistics Klass
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Tillhandahåller statistiska data för Transmission Control Protocol (TCP).
public ref class TcpStatistics abstract
public abstract class TcpStatistics
type TcpStatistics = class
Public MustInherit Class TcpStatistics
- Arv
-
TcpStatistics
Exempel
I följande kodexempel visas TCP-statistiken för den angivna adressfamiljen.
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("");
}
Kommentarer
Instanser av den här klassen returneras av GetTcpIPv4Statistics metoderna och GetTcpIPv6Statistics för att ge program åtkomst till TCP-trafikinformation.
Informationen i den här klassen korrelerar med de hanteringsinformationsobjekt som beskrivs i https://www.ietf.org/rfc/rfc2012.txt.
Konstruktorer
| Name | Description |
|---|---|
| TcpStatistics() |
Initierar en ny instans av TcpStatistics klassen. |
Egenskaper
| Name | Description |
|---|---|
| ConnectionsAccepted |
Hämtar antalet godkända TCP-anslutningsbegäranden (Transmission Control Protocol). |
| ConnectionsInitiated |
Hämtar antalet TCP-anslutningsbegäranden (Transmission Control Protocol) som görs av klienter. |
| CumulativeConnections |
Anger det totala antalet TCP-anslutningar (Transmission Control Protocol) som upprättats. |
| CurrentConnections |
Hämtar antalet aktuella TCP-anslutningar (Transmission Control Protocol). |
| ErrorsReceived |
Hämtar antalet TCP-fel (Transmission Control Protocol). |
| FailedConnectionAttempts |
Hämtar antalet misslyckade TCP-anslutningsförsök (Transmission Control Protocol). |
| MaximumConnections |
Hämtar det maximala antalet TCP-anslutningar (Transmission Control Protocol) som stöds. |
| MaximumTransmissionTimeout |
Hämtar det maximala timeout-värdet för återöverföring för TCP-segment (Transmission Control Protocol). |
| MinimumTransmissionTimeout |
Hämtar det lägsta timeout-värdet för återöverföring för TCP-segment (Transmission Control Protocol). |
| ResetConnections |
Hämtar antalet RST-paket som tas emot av TCP-anslutningar (Transmission Control Protocol). |
| ResetsSent |
Hämtar antalet TCP-segment (Transmission Control Protocol) som skickas med återställningsflaggan inställd. |
| SegmentsReceived |
Hämtar antalet TCP-segment (Transmission Control Protocol). |
| SegmentsResent |
Hämtar antalet TCP-segment (Transmission Control Protocol) som skickas på nytt. |
| SegmentsSent |
Hämtar antalet TCP-segment (Transmission Control Protocol) som skickas. |
Metoder
| Name | Description |
|---|---|
| Equals(Object) |
Avgör om det angivna objektet är lika med det aktuella objektet. (Ärvd från Object) |
| GetHashCode() |
Fungerar som standard-hash-funktion. (Ärvd från Object) |
| GetType() |
Hämtar den aktuella instansen Type . (Ärvd från Object) |
| MemberwiseClone() |
Skapar en ytlig kopia av den aktuella Object. (Ärvd från Object) |
| ToString() |
Returnerar en sträng som representerar det aktuella objektet. (Ärvd från Object) |