]>
Commit | Line | Data |
---|---|---|
be4bd463 JS |
1 | % ---------------------------------------------------------------------------- |
2 | % CLASS: wxIPaddress | |
3 | % ---------------------------------------------------------------------------- | |
4 | \section{\class{wxIPaddress}}\label{wxipaddress} | |
5 | ||
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, | |
9 | is being developed. | |
10 | ||
11 | \wxheading{Derived from} | |
12 | ||
7376079d VZ |
13 | \helpref{wxSockAddress}{wxsockaddress}\\ |
14 | \helpref{wxObject}{wxobject} | |
be4bd463 JS |
15 | |
16 | \wxheading{Include files} | |
17 | ||
18 | <wx/socket.h> | |
19 | ||
20 | % ---------------------------------------------------------------------------- | |
21 | % MEMBERS | |
22 | % ---------------------------------------------------------------------------- | |
23 | \latexignore{\rtfignore{\wxheading{Members}}} | |
24 | ||
25 | % | |
26 | % Hostname | |
27 | % | |
28 | ||
f0e8a2d0 | 29 | \membersection{wxIPaddress::Hostname}\label{wxipaddresshostname} |
be4bd463 JS |
30 | |
31 | \func{virtual bool}{Hostname}{\param{const wxString\&}{ hostname}} | |
32 | ||
33 | Set the address to {\it hostname}, which can be a host name | |
34 | or an IP-style address in a format dependent on implementation. | |
35 | ||
36 | \wxheading{Return value} | |
37 | ||
38 | Returns true on success, false if something goes wrong | |
39 | (invalid hostname or invalid IP address). | |
40 | ||
be4bd463 JS |
41 | \func{virtual wxString}{Hostname}{\void} |
42 | ||
43 | Returns the hostname which matches the IP address. | |
44 | ||
45 | % | |
46 | % IPAddress | |
47 | % | |
48 | ||
f0e8a2d0 | 49 | \membersection{wxIPaddress::IPAddress}\label{wxipaddressipaddress} |
be4bd463 JS |
50 | |
51 | \func{virtual wxString}{IPAddress}{\void} | |
52 | ||
53 | Returns a wxString containing the IP address. | |
54 | ||
55 | % | |
56 | % Service | |
57 | % | |
58 | ||
f0e8a2d0 | 59 | \membersection{wxIPaddress::Service}\label{wxipaddressservice} |
be4bd463 JS |
60 | |
61 | \func{virtual bool}{Service}{\param{const wxString\&}{ service}} | |
62 | ||
63 | Set the port to that corresponding to the specified {\it service}. | |
64 | ||
65 | \wxheading{Return value} | |
66 | ||
67 | Returns true on success, false if something goes wrong | |
68 | (invalid service). | |
69 | ||
be4bd463 JS |
70 | \func{virtual bool}{Service}{\param{unsigned short}{ service}} |
71 | ||
72 | Set the port to that corresponding to the specified {\it service}. | |
73 | ||
74 | \wxheading{Return value} | |
75 | ||
76 | Returns true on success, false if something goes wrong | |
77 | (invalid service). | |
78 | ||
be4bd463 JS |
79 | \func{virtual unsigned short}{Service}{\void} |
80 | ||
81 | Returns the current service. | |
82 | ||
83 | % | |
84 | % AnyAddress | |
85 | % | |
86 | ||
87 | \membersection{wxIPaddress::AnyAddress}\label{wxIPaddressanyaddress} | |
88 | ||
89 | \func{virtual bool}{AnyAddress}{\void} | |
90 | ||
91 | Internally, this is the same as setting the IP address | |
92 | to {\bf INADDR\_ANY}. | |
93 | ||
94 | On IPV4 implementations, 0.0.0.0 | |
95 | ||
96 | On IPV6 implementations, :: | |
97 | ||
98 | \wxheading{Return value} | |
99 | ||
100 | Returns true on success, false if something went wrong. | |
101 | ||
60edcf45 VZ |
102 | % |
103 | % BroadcastAddress | |
104 | % | |
105 | ||
0a82af9b | 106 | \membersection{wxIPaddress::BroadcastAddress}\label{wxipaddressbroadcastaddress} |
60edcf45 VZ |
107 | |
108 | \func{virtual bool}{BroadcastAddress}{\void} | |
109 | ||
110 | Internally, this is the same as setting the IP address | |
111 | to {\bf INADDR\_BROADCAST}. | |
112 | ||
113 | On IPV4 implementations, 255.255.255.255 | |
114 | ||
115 | \wxheading{Return value} | |
116 | ||
117 | Returns true on success, false if something went wrong. | |
118 | ||
be4bd463 JS |
119 | % |
120 | % LocalHost | |
121 | % | |
122 | ||
0a82af9b | 123 | \membersection{wxIPaddress::LocalHost}\label{wxipaddresslocalhost} |
be4bd463 JS |
124 | |
125 | \func{virtual bool}{LocalHost}{\void} | |
126 | ||
127 | Set address to localhost. | |
128 | ||
129 | On IPV4 implementations, 127.0.0.1 | |
130 | ||
131 | On IPV6 implementations, ::1 | |
132 | ||
133 | \wxheading{Return value} | |
134 | ||
135 | Returns true on success, false if something went wrong. | |
136 | ||
0a82af9b | 137 | \membersection{wxIPaddress::IsLocalHost}\label{wxipaddressislocalhost} |
be4bd463 JS |
138 | |
139 | \func{virtual bool}{IsLocalHost}{\void} | |
140 | ||
141 | Determines if current address is set to localhost. | |
142 | ||
143 | \wxheading{Return value} | |
144 | ||
145 | Returns true if address is localhost, false if internet address. | |
146 |