Returns information about the Internet Protocol version 4 (IPV4) Transmission Control Protocol (TCP) connections on the local computer.
| C# | Visual Basic |
public TcpConnectionInformation[] GetActiveTcpConnections()
Public Function GetActiveTcpConnections As TcpConnectionInformation()
A TcpConnectionInformation array that contains objects that describe the active TCP connections, or an empty array if no active TCP connections are detected.
The objects returned by this method include listeners in all TCP states except the Listen state.
The TCP protocol is defined in IETF RFC 793.
Note that the objects returned by this method reflect the connections as of the time the array is created.
This information is not updated dynamically.