File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -1284,7 +1284,7 @@ abstract class Address
12841284 // libraries shipped with DMD. Thus, we check for getnameinfo at
12851285 // runtime in the shared module constructor, and use it if it's
12861286 // available in the base class method. Classes for specific network
1287- // families (e.g. InternetHost ) override this method and use a
1287+ // families (e.g. InternetAddress ) override this method and use a
12881288 // deprecated, albeit commonly-available method when getnameinfo()
12891289 // is not available.
12901290 // http://technet.microsoft.com/en-us/library/aa450403.aspx
@@ -1863,6 +1863,19 @@ public:
18631863 sin6 = addr;
18641864 }
18651865
1866+ version (Posix )
1867+ {
1868+ // / Human readable string representing the IPv6 address in RFC 2373 form.
1869+ override string toAddrString () @trusted const
1870+ {
1871+ char [INET6_ADDRSTRLEN ] buf;
1872+ string addrString = to! string (
1873+ .inet_ntop(AddressFamily.INET6 , &sin6.sin6_addr, buf.ptr, INET6_ADDRSTRLEN )
1874+ );
1875+ return addrString;
1876+ }
1877+ }
1878+
18661879 /**
18671880 * Parse an IPv6 host address string as described in RFC 2373, and return the
18681881 * address.
You can’t perform that action at this time.
0 commit comments