X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/55d99c7a77789ff4904bf96eddca3715eb5af9b9..30fd71e65bbbada8d17a0efbafbbbb3bafb42f9f:/src/common/sckaddr.cpp?ds=sidebyside diff --git a/src/common/sckaddr.cpp b/src/common/sckaddr.cpp index 66d12c2bd1..80658f3314 100644 --- a/src/common/sckaddr.cpp +++ b/src/common/sckaddr.cpp @@ -181,6 +181,18 @@ wxSockAddress *wxIPV4address::Clone() const return addr; } +wxString wxIPV4address::IPAddress() const +{ + unsigned long raw = GAddress_INET_GetHostAddress(m_address); + return wxString::Format( + _T("%u.%u.%u.%u"), + (unsigned char)(raw & 0xff), + (unsigned char)((raw>>8) & 0xff), + (unsigned char)((raw>>16) & 0xff), + (unsigned char)((raw>>24) & 0xff) + ); +} + #if 0 // --------------------------------------------------------------------------- // wxIPV6address