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