Process.connections
NetConnection[] connections(string kind = "inet") @trustedGets network connections for this process.
Parameters
kind | Type of connections to retrieve ("inet", "inet4", "inet6", "tcp", "tcp4", "tcp6", "udp", "udp4", "udp6", "unix"). |
Returns
Array of NetConnection structs.
Throws
AccessDenied if access is denied.
Example:
auto proc = Process.current();
auto conns = proc.connections("inet");
writeln("Connections: ", conns.length);