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
1284
1284
// libraries shipped with DMD. Thus, we check for getnameinfo at
1285
1285
// runtime in the shared module constructor, and use it if it's
1286
1286
// 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
1288
1288
// deprecated, albeit commonly-available method when getnameinfo()
1289
1289
// is not available.
1290
1290
// http://technet.microsoft.com/en-us/library/aa450403.aspx
@@ -1863,6 +1863,19 @@ public:
1863
1863
sin6 = addr;
1864
1864
}
1865
1865
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, cast (char * ) buf, INET6_ADDRSTRLEN )
1874
+ );
1875
+ return addrString;
1876
+ }
1877
+ }
1878
+
1866
1879
/**
1867
1880
* Parse an IPv6 host address string as described in RFC 2373, and return the
1868
1881
* address.
You can’t perform that action at this time.
0 commit comments