wxIPaddress is an abstract base class for all internet protocol address objects. Currently, only wxIPV4address is implemented. An experimental implementation for IPV6, wxIPV6address, is being developed.
Derived from
Include files
<wx/socket.h>
Members
wxIPaddress::Hostname
wxIPaddress::IPAddress
wxIPaddress::Service
wxIPaddress::AnyAddress
wxIPaddress::LocalHost
wxIPaddress::IsLocalHost
virtual bool Hostname(const wxString& hostname)
Set the address to hostname, which can be a host name or an IP-style address in a format dependent on implementation.
Return value
Returns true on success, false if something goes wrong (invalid hostname or invalid IP address).
virtual wxString Hostname()
Returns the hostname which matches the IP address.
virtual wxString IPAddress()
Returns a wxString containing the IP address.
virtual bool Service(const wxString& service)
Set the port to that corresponding to the specified service.
Return value
Returns true on success, false if something goes wrong (invalid service).
virtual bool Service(unsigned short service)
Set the port to that corresponding to the specified service.
Return value
Returns true on success, false if something goes wrong (invalid service).
virtual unsigned short Service()
Returns the current service.
virtual bool AnyAddress()
Internally, this is the same as setting the IP address to INADDR_ANY.
On IPV4 implementations, 0.0.0.0
On IPV6 implementations, ::
Return value
Returns true on success, false if something went wrong.
virtual bool LocalHost()
Set address to localhost.
On IPV4 implementations, 127.0.0.1
On IPV6 implementations, ::1
Return value
Returns true on success, false if something went wrong.
virtual bool IsLocalHost()
Determines if current address is set to localhost.
Return value
Returns true if address is localhost, false if internet address.