Example:
auto future = asyncNetConnections();
// Do other work while connections are being collected...
NetConnection[] connections = future.get();
writeln("Found ", connections.length, " connections");Future!(NetConnection[]) asyncNetConnections(string kind = "inet")Gets network connections asynchronously.
This function spawns a separate thread to collect network connection information, allowing the caller to continue working while the collection happens in the background.
kind | The type of connections to retrieve ("inet", "inet4", "inet6", "tcp", "tcp4", "tcp6", "udp", "udp4", "udp6", "unix"). |
Example:
auto future = asyncNetConnections();
// Do other work while connections are being collected...
NetConnection[] connections = future.get();
writeln("Found ", connections.length, " connections");