Example:
auto conns = netConnections("tcp");
foreach (conn; conns) {
writeln(conn.localAddress, ":", conn.localPort, " -> ", conn.remoteAddress, ":", conn.remotePort);
}Gets active network connections.
kind | Type of connections to return: "inet", "inet4", "inet6", "tcp", "tcp4", "tcp6", "udp", "udp4", "udp6", "unix", "all" |
Example:
auto conns = netConnections("tcp");
foreach (conn; conns) {
writeln(conn.localAddress, ":", conn.localPort, " -> ", conn.remoteAddress, ":", conn.remotePort);
}