Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
11
Task/DNS-query/D/dns-query.d
Normal file
11
Task/DNS-query/D/dns-query.d
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import std.stdio, std.socket;
|
||||
|
||||
void main() {
|
||||
auto domain = "www.kame.net", port = "80";
|
||||
|
||||
auto a = getAddressInfo(domain, port, AddressFamily.INET);
|
||||
writefln("IPv4 address for %s: %s", domain, a[0].address);
|
||||
|
||||
a = getAddressInfo(domain, port, AddressFamily.INET6);
|
||||
writefln("IPv6 address for %s: %s", domain, a[0].address);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue