Sdílet prostřednictvím


TcpStatistics.CumulativeConnections Vlastnost

Definice

Určuje celkový počet vytvořených připojení TCP (Transmission Control Protocol).

public:
 abstract property long CumulativeConnections { long get(); };
public abstract long CumulativeConnections { get; }
member this.CumulativeConnections : int64
Public MustOverride ReadOnly Property CumulativeConnections As Long

Hodnota vlastnosti

Hodnota Int64 , která určuje celkový počet vytvořených připojení.

Příklady

Následující příklad kódu zobrazí informace o připojení.

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

Platí pro