]>
Commit | Line | Data |
---|---|---|
1 | % ---------------------------------------------------------------------------- | |
2 | % CLASS: wxIPV4address | |
3 | % ---------------------------------------------------------------------------- | |
4 | \section{\class{wxIPV4address}}\label{wxipv4address} | |
5 | ||
6 | \wxheading{Derived from} | |
7 | ||
8 | \helpref{wxIPaddress}{wxipaddress}\\ | |
9 | \helpref{wxSockAddress}{wxsockaddress}\\ | |
10 | \helpref{wxObject}{wxobject} | |
11 | ||
12 | \wxheading{Include files} | |
13 | ||
14 | <wx/socket.h> | |
15 | ||
16 | % ---------------------------------------------------------------------------- | |
17 | % MEMBERS | |
18 | % ---------------------------------------------------------------------------- | |
19 | \latexignore{\rtfignore{\wxheading{Members}}} | |
20 | ||
21 | % | |
22 | % Hostname | |
23 | % | |
24 | ||
25 | \membersection{wxIPV4address::Hostname}\label{wxipv4addresshostname} | |
26 | ||
27 | \func{bool}{Hostname}{\param{const wxString\&}{ hostname}} | |
28 | ||
29 | Set the address to {\it hostname}, which can be a host name | |
30 | or an IP-style address in dot notation (a.b.c.d) | |
31 | ||
32 | \wxheading{Return value} | |
33 | ||
34 | Returns true on success, false if something goes wrong | |
35 | (invalid hostname or invalid IP address). | |
36 | ||
37 | \func{wxString}{Hostname}{\void} | |
38 | ||
39 | Returns the hostname which matches the IP address. | |
40 | ||
41 | % | |
42 | % IPAddress | |
43 | % | |
44 | ||
45 | \membersection{wxIPV4address::IPAddress}\label{wxipv4addressipaddress} | |
46 | ||
47 | \func{wxString}{IPAddress}{\void} | |
48 | ||
49 | Returns a wxString containing the IP address in dot quad (127.0.0.1) format. | |
50 | ||
51 | % | |
52 | % Service | |
53 | % | |
54 | ||
55 | \membersection{wxIPV4address::Service}\label{wxipv4addressservice} | |
56 | ||
57 | \func{bool}{Service}{\param{const wxString\&}{ service}} | |
58 | ||
59 | Set the port to that corresponding to the specified {\it service}. | |
60 | ||
61 | \wxheading{Return value} | |
62 | ||
63 | Returns true on success, false if something goes wrong | |
64 | (invalid service). | |
65 | ||
66 | \func{bool}{Service}{\param{unsigned short}{ service}} | |
67 | ||
68 | Set the port to that corresponding to the specified {\it service}. | |
69 | ||
70 | \wxheading{Return value} | |
71 | ||
72 | Returns true on success, false if something goes wrong | |
73 | (invalid service). | |
74 | ||
75 | \func{unsigned short}{Service}{\void} | |
76 | ||
77 | Returns the current service. | |
78 | ||
79 | % | |
80 | % AnyAddress | |
81 | % | |
82 | ||
83 | \membersection{wxIPV4address::AnyAddress}\label{wxipv4addressanyaddress} | |
84 | ||
85 | \func{bool}{AnyAddress}{\void} | |
86 | ||
87 | Set address to any of the addresses of the current machine. Whenever | |
88 | possible, use this function instead of \helpref{wxIPV4address::LocalHost}{wxipv4addresslocalhost}, | |
89 | as this correctly handles multi-homed hosts and avoids other small | |
90 | problems. Internally, this is the same as setting the IP address | |
91 | to {\bf INADDR\_ANY}. | |
92 | ||
93 | \wxheading{Return value} | |
94 | ||
95 | Returns true on success, false if something went wrong. | |
96 | ||
97 | % | |
98 | % LocalHost | |
99 | % | |
100 | ||
101 | \membersection{wxIPV4address::LocalHost}\label{wxipv4addresslocalhost} | |
102 | ||
103 | \func{bool}{LocalHost}{\void} | |
104 | ||
105 | Set address to localhost (127.0.0.1). Whenever possible, use the | |
106 | \helpref{wxIPV4address::AnyAddress}{wxipv4addressanyaddress}, | |
107 | function instead of this one, as this will correctly handle multi-homed | |
108 | hosts and avoid other small problems. | |
109 | ||
110 | \wxheading{Return value} | |
111 | ||
112 | Returns true on success, false if something went wrong. | |
113 |