TcpStatistics.MaximumConnections Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the maximum number of supported Transmission Control Protocol (TCP) connections.
public:
abstract property long MaximumConnections { long get(); };
public abstract long MaximumConnections { get; }
member this.MaximumConnections : int64
Public MustOverride ReadOnly Property MaximumConnections As Long
Property Value
An Int64 value that specifies the total number of TCP connections that can be supported.
Examples
The following code example displays time-out and maximum connection information.
void ShowTcpTimeouts()
{
IPGlobalProperties ^ properties = IPGlobalProperties::GetIPGlobalProperties();
TcpStatistics ^ tcpstat = properties->GetTcpIPv4Statistics();
Console::WriteLine( " Minimum Transmission Timeout............. : {0}",
tcpstat->MinimumTransmissionTimeout );
Console::WriteLine( " Maximum Transmission Timeout............. : {0}",
tcpstat->MaximumTransmissionTimeout );
Console::WriteLine( " Maximum connections ............. : {0}",
tcpstat->MaximumConnections );
}
public static void ShowTcpTimeouts()
{
IPGlobalProperties properties = IPGlobalProperties.GetIPGlobalProperties();
TcpStatistics tcpstat = properties.GetTcpIPv4Statistics();
Console.WriteLine(" Minimum Transmission Timeout............. : {0}",
tcpstat.MinimumTransmissionTimeout);
Console.WriteLine(" Maximum Transmission Timeout............. : {0}",
tcpstat.MaximumTransmissionTimeout);
Console.WriteLine(" Maximum connections ............. : {0}",
tcpstat.MaximumConnections);
Console.WriteLine();
}
Public Shared Sub ShowTcpTimeouts()
Dim properties As IPGlobalProperties = IPGlobalProperties.GetIPGlobalProperties()
Dim tcpstat As TcpStatistics = properties.GetTcpIPv4Statistics()
Console.WriteLine(" Minimum Transmission Timeout............. : {0}", tcpstat.MinimumTransmissionTimeout)
Console.WriteLine(" Maximum Transmission Timeout............. : {0}", tcpstat.MaximumTransmissionTimeout)
Console.WriteLine(" Maximum connections ............. : {0}", tcpstat.MaximumConnections)
End Sub
Remarks
If the maximum number of connections is dynamic, this property returns -1.
Applies to
Colaborați cu noi pe GitHub
Sursa pentru acest conținut poate fi găsită pe GitHub, unde puteți, de asemenea, să creați și să consultați probleme și solicitări de tragere. Pentru mai multe informații, consultați ghidul nostru pentru colaboratori.