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