added wxSocket::IPAddress() (patch 694119)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21828 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user