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