1 % ----------------------------------------------------------------------------
3 % ----------------------------------------------------------------------------
4 \section{\class{wxIPaddress
}}\label{wxipaddress
}
6 wxIPaddress is an abstract base class for all internet protocol address
7 objects. Currently, only
\helpref{wxIPV4address
}{wxipv4address
}
8 is implemented. An experimental implementation for IPV6, wxIPV6address,
11 \wxheading{Derived from
}
13 \helpref{wxSockAddress
}{wxsockaddress
}
15 \wxheading{Include files
}
19 % ----------------------------------------------------------------------------
21 % ----------------------------------------------------------------------------
22 \latexignore{\rtfignore{\wxheading{Members
}}}
28 \membersection{wxIPaddress::Hostname
}\label{wxipaddresshostname
}
30 \func{virtual bool
}{Hostname
}{\param{const wxString\&
}{ hostname
}}
32 Set the address to
{\it hostname
}, which can be a host name
33 or an IP-style address in a format dependent on implementation.
35 \wxheading{Return value
}
37 Returns true on success, false if something goes wrong
38 (invalid hostname or invalid IP address).
40 \func{virtual wxString
}{Hostname
}{\void}
42 Returns the hostname which matches the IP address.
48 \membersection{wxIPaddress::IPAddress
}\label{wxipaddressipaddress
}
50 \func{virtual wxString
}{IPAddress
}{\void}
52 Returns a wxString containing the IP address.
58 \membersection{wxIPaddress::Service
}\label{wxipaddressservice
}
60 \func{virtual bool
}{Service
}{\param{const wxString\&
}{ service
}}
62 Set the port to that corresponding to the specified
{\it service
}.
64 \wxheading{Return value
}
66 Returns true on success, false if something goes wrong
69 \func{virtual bool
}{Service
}{\param{unsigned short
}{ service
}}
71 Set the port to that corresponding to the specified
{\it service
}.
73 \wxheading{Return value
}
75 Returns true on success, false if something goes wrong
78 \func{virtual unsigned short
}{Service
}{\void}
80 Returns the current service.
86 \membersection{wxIPaddress::AnyAddress
}\label{wxIPaddressanyaddress
}
88 \func{virtual bool
}{AnyAddress
}{\void}
90 Internally, this is the same as setting the IP address
93 On IPV4 implementations,
0.0.0.0
95 On IPV6 implementations, ::
97 \wxheading{Return value
}
99 Returns true on success, false if something went wrong.
105 \membersection{wxIPaddress::BroadcastAddress
}\label{wxipaddressbroadcastaddress
}
107 \func{virtual bool
}{BroadcastAddress
}{\void}
109 Internally, this is the same as setting the IP address
110 to
{\bf INADDR
\_BROADCAST}.
112 On IPV4 implementations,
255.255.255.255
114 \wxheading{Return value
}
116 Returns true on success, false if something went wrong.
122 \membersection{wxIPaddress::LocalHost
}\label{wxipaddresslocalhost
}
124 \func{virtual bool
}{LocalHost
}{\void}
126 Set address to localhost.
128 On IPV4 implementations,
127.0.0.1
130 On IPV6 implementations, ::
1
132 \wxheading{Return value
}
134 Returns true on success, false if something went wrong.
136 \membersection{wxIPaddress::IsLocalHost
}\label{wxipaddressislocalhost
}
138 \func{virtual bool
}{IsLocalHost
}{\void}
140 Determines if current address is set to localhost.
142 \wxheading{Return value
}
144 Returns true if address is localhost, false if internet address.