git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21828
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
and Mac) which contain some tests that were in setup.h
- added event sink argument to wxEvtHandler::Connect()
- added support for POST method and alt ports to wxHTTP (Roger Chickering)
and Mac) which contain some tests that were in setup.h
- added event sink argument to wxEvtHandler::Connect()
- added support for POST method and alt ports to wxHTTP (Roger Chickering)
+- added wxSocket::IPAddress() (Chris Mellon)
Returns the hostname which matches the IP address.
Returns the hostname which matches the IP address.
+%
+% IPAddress
+%
+
+\membersection{wxIPV4address::IPAddress}
+
+\func{wxString}{IPAddress}{\void}
+
+Returns a wxString containing the IP address in dot quad (127.0.0.1) format.
+
wxString Hostname();
wxString OrigHostname() { return m_origHostname; }
unsigned short Service();
wxString Hostname();
wxString OrigHostname() { return m_origHostname; }
unsigned short Service();
+ wxString IPAddress() const;
virtual int Type() { return wxSockAddress::IPV4; }
virtual wxSockAddress *Clone() const;
virtual int Type() { return wxSockAddress::IPV4; }
virtual wxSockAddress *Clone() const;
+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
#if 0
// ---------------------------------------------------------------------------
// wxIPV6address