vibe.d beta banner
get vibe.d
0.10.0

Asynchronous I/O that doesn’t get in your way, written in D

Function resolveHost

Resolves the given host name/IP address string.

NetworkAddress resolveHost (
  string host,
  std.socket.AddressFamily address_family = cast(AddressFamily)cast(ushort)0u,
  bool use_dns = true
) @safe;

NetworkAddress resolveHost (
  string host,
  ushort address_family,
  bool use_dns = true
) @safe;

Setting use_dns to false will only allow IP address strings but also guarantees that the call will not block.

Authors

Sönke Ludwig

Copyright

© 2012-2016 Sönke Ludwig

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.