]>
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 | ||
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 | ||
f0e8a2d0 | 28 | \membersection{wxIPaddress::Hostname}\label{wxipaddresshostname} |
be4bd463 JS |
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 | ||
be4bd463 JS |
40 | \func{virtual wxString}{Hostname}{\void} |
41 | ||
42 | Returns the hostname which matches the IP address. | |
43 | ||
44 | % | |
45 | % IPAddress | |
46 | % | |
47 | ||
f0e8a2d0 | 48 | \membersection{wxIPaddress::IPAddress}\label{wxipaddressipaddress} |
be4bd463 JS |
49 | |
50 | \func{virtual wxString}{IPAddress}{\void} | |
51 | ||
52 | Returns a wxString containing the IP address. | |
53 | ||
54 | % | |
55 | % Service | |
56 | % | |
57 | ||
f0e8a2d0 | 58 | \membersection{wxIPaddress::Service}\label{wxipaddressservice} |
be4bd463 JS |
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 | ||
be4bd463 JS |
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 | ||
be4bd463 JS |
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 | % LocalHost | |
103 | % | |
104 | ||
105 | \membersection{wxIPaddress::LocalHost}\label{wxIPaddresslocalhost} | |
106 | ||
107 | \func{virtual bool}{LocalHost}{\void} | |
108 | ||
109 | Set address to localhost. | |
110 | ||
111 | On IPV4 implementations, 127.0.0.1 | |
112 | ||
113 | On IPV6 implementations, ::1 | |
114 | ||
115 | \wxheading{Return value} | |
116 | ||
117 | Returns true on success, false if something went wrong. | |
118 | ||
461fb267 | 119 | \membersection{wxIPaddress::IsLocalHost}\label{wxIPaddressislocalhost} |
be4bd463 JS |
120 | |
121 | \func{virtual bool}{IsLocalHost}{\void} | |
122 | ||
123 | Determines if current address is set to localhost. | |
124 | ||
125 | \wxheading{Return value} | |
126 | ||
127 | Returns true if address is localhost, false if internet address. | |
128 |