Initial commit
[platform/upstream/glib2.0.git] / docs / reference / gio / html / GInetSocketAddress.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>GInetSocketAddress</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7 <link rel="home" href="index.html" title="GIO Reference Manual">
8 <link rel="up" href="networking.html" title="Lowlevel platform-independent network support">
9 <link rel="prev" href="GSocketAddress.html" title="GSocketAddress">
10 <link rel="next" href="GUnixSocketAddress.html" title="GUnixSocketAddress">
11 <meta name="generator" content="GTK-Doc V1.13 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 <link rel="part" href="pt01.html" title="Part I. GIO Overview">
14 <link rel="chapter" href="ch01.html" title="Introduction">
15 <link rel="chapter" href="ch02.html" title="Compiling GIO applications">
16 <link rel="chapter" href="ch03.html" title="Running GIO applications">
17 <link rel="chapter" href="extending-gio.html" title="Extending GIO">
18 <link rel="part" href="pt02.html" title="Part II. API Reference">
19 <link rel="chapter" href="file_ops.html" title="File Operations">
20 <link rel="chapter" href="file_mon.html" title="File System Monitoring">
21 <link rel="chapter" href="async.html" title="Asynchronous I/O">
22 <link rel="chapter" href="conversion.html" title="Data conversion">
23 <link rel="chapter" href="streaming.html" title="Streaming I/O">
24 <link rel="chapter" href="types.html" title="File types and applications">
25 <link rel="chapter" href="volume_mon.html" title="Volumes and Drives">
26 <link rel="chapter" href="icons.html" title="Icons">
27 <link rel="chapter" href="failable_initialization.html" title="Failable Initialization">
28 <link rel="chapter" href="networking.html" title="Lowlevel platform-independent network support">
29 <link rel="chapter" href="resolver.html" title="DNS resolution">
30 <link rel="chapter" href="highlevel-socket.html" title="Highlevel network functionallity">
31 <link rel="chapter" href="utils.html" title="Utilities">
32 <link rel="chapter" href="extending.html" title="Extending GIO">
33 <link rel="part" href="migrating.html" title="Part III. Migrating to GIO">
34 <link rel="chapter" href="ch19.html" title="Migrating from POSIX to GIO">
35 <link rel="chapter" href="ch20.html" title="Migrating from GnomeVFS to GIO">
36 <link rel="chapter" href="gio-hierarchy.html" title="Object Hierarchy">
37 <link rel="index" href="api-index-full.html" title="Index">
38 <link rel="index" href="api-index-deprecated.html" title="Index of deprecated symbols">
39 <link rel="index" href="api-index-2-18.html" title="Index of new symbols in 2.18">
40 <link rel="index" href="api-index-2-20.html" title="Index of new symbols in 2.20">
41 <link rel="index" href="api-index-2-22.html" title="Index of new symbols in 2.22">
42 <link rel="index" href="api-index-2-24.html" title="Index of new symbols in 2.24">
43 </head>
44 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
45 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
46 <tr valign="middle">
47 <td><a accesskey="p" href="GSocketAddress.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
48 <td><a accesskey="u" href="networking.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
49 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
50 <th width="100%" align="center">GIO Reference Manual</th>
51 <td><a accesskey="n" href="GUnixSocketAddress.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
52 </tr>
53 <tr><td colspan="5" class="shortcuts">
54 <a href="#GInetSocketAddress.synopsis" class="shortcut">Top</a>
55                    | 
56                   <a href="#GInetSocketAddress.description" class="shortcut">Description</a>
57                    | 
58                   <a href="#GInetSocketAddress.object-hierarchy" class="shortcut">Object Hierarchy</a>
59                    | 
60                   <a href="#GInetSocketAddress.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
61                    | 
62                   <a href="#GInetSocketAddress.properties" class="shortcut">Properties</a>
63 </td></tr>
64 </table>
65 <div class="refentry" title="GInetSocketAddress">
66 <a name="GInetSocketAddress"></a><div class="titlepage"></div>
67 <div class="refnamediv"><table width="100%"><tr>
68 <td valign="top">
69 <h2><span class="refentrytitle"><a name="GInetSocketAddress.top_of_page"></a>GInetSocketAddress</span></h2>
70 <p>GInetSocketAddress — Internet GSocketAddress</p>
71 </td>
72 <td valign="top" align="right"></td>
73 </tr></table></div>
74 <div class="refsynopsisdiv" title="Synopsis">
75 <a name="GInetSocketAddress.synopsis"></a><h2>Synopsis</h2>
76 <pre class="synopsis">                    <a class="link" href="GInetSocketAddress.html#GInetSocketAddress-struct" title="GInetSocketAddress">GInetSocketAddress</a>;
77 <a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="returnvalue">GSocketAddress</span></a> *    <a class="link" href="GInetSocketAddress.html#g-inet-socket-address-new" title="g_inet_socket_address_new ()">g_inet_socket_address_new</a>           (<a class="link" href="GInetAddress.html" title="GInetAddress"><span class="returnvalue">GInetAddress</span></a> *address,
78                                                          <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint16"><span class="returnvalue">guint16</span></a> port);
79 <a class="link" href="GInetAddress.html" title="GInetAddress"><span class="returnvalue">GInetAddress</span></a> *      <a class="link" href="GInetSocketAddress.html#g-inet-socket-address-get-address" title="g_inet_socket_address_get_address ()">g_inet_socket_address_get_address</a>   (<a class="link" href="GInetSocketAddress.html" title="GInetSocketAddress"><span class="returnvalue">GInetSocketAddress</span></a> *address);
80 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint16"><span class="returnvalue">guint16</span></a>             <a class="link" href="GInetSocketAddress.html#g-inet-socket-address-get-port" title="g_inet_socket_address_get_port ()">g_inet_socket_address_get_port</a>      (<a class="link" href="GInetSocketAddress.html" title="GInetSocketAddress"><span class="returnvalue">GInetSocketAddress</span></a> *address);
81 </pre>
82 </div>
83 <div class="refsect1" title="Object Hierarchy">
84 <a name="GInetSocketAddress.object-hierarchy"></a><h2>Object Hierarchy</h2>
85 <pre class="synopsis">
86   <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
87    +----<a class="link" href="GSocketAddress.html" title="GSocketAddress">GSocketAddress</a>
88          +----GInetSocketAddress
89 </pre>
90 </div>
91 <div class="refsect1" title="Implemented Interfaces">
92 <a name="GInetSocketAddress.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
93 <p>
94 GInetSocketAddress implements
95  <a class="link" href="GSocketConnectable.html" title="GSocketConnectable">GSocketConnectable</a>.</p>
96 </div>
97 <div class="refsect1" title="Properties">
98 <a name="GInetSocketAddress.properties"></a><h2>Properties</h2>
99 <pre class="synopsis">
100   "<a class="link" href="GInetSocketAddress.html#GInetSocketAddress--address" title='The "address" property'>address</a>"                  <a class="link" href="GInetAddress.html" title="GInetAddress"><span class="type">GInetAddress</span></a>*         : Read / Write / Construct Only
101   "<a class="link" href="GInetSocketAddress.html#GInetSocketAddress--port" title='The "port" property'>port</a>"                     <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>                 : Read / Write / Construct Only
102 </pre>
103 </div>
104 <div class="refsect1" title="Description">
105 <a name="GInetSocketAddress.description"></a><h2>Description</h2>
106 <p>
107 An IPv4 or IPv6 socket address; that is, the combination of a
108 <a class="link" href="GInetAddress.html" title="GInetAddress"><span class="type">GInetAddress</span></a> and a port number.</p>
109 </div>
110 <div class="refsect1" title="Details">
111 <a name="GInetSocketAddress.details"></a><h2>Details</h2>
112 <div class="refsect2" title="GInetSocketAddress">
113 <a name="GInetSocketAddress-struct"></a><h3>GInetSocketAddress</h3>
114 <pre class="programlisting">typedef struct _GInetSocketAddress GInetSocketAddress;</pre>
115 <p>
116 An IPv4 or IPv6 socket address, corresponding to a <span class="type">struct
117 sockaddr_in</span> or <span class="type">struct sockaddr_in6</span>.</p>
118 </div>
119 <hr>
120 <div class="refsect2" title="g_inet_socket_address_new ()">
121 <a name="g-inet-socket-address-new"></a><h3>g_inet_socket_address_new ()</h3>
122 <pre class="programlisting"><a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="returnvalue">GSocketAddress</span></a> *    g_inet_socket_address_new           (<a class="link" href="GInetAddress.html" title="GInetAddress"><span class="returnvalue">GInetAddress</span></a> *address,
123                                                          <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint16"><span class="returnvalue">guint16</span></a> port);</pre>
124 <p>
125 Creates a new <a class="link" href="GInetSocketAddress.html" title="GInetSocketAddress"><span class="type">GInetSocketAddress</span></a> for <em class="parameter"><code>address</code></em> and <em class="parameter"><code>port</code></em>.</p>
126 <div class="variablelist"><table border="0">
127 <col align="left" valign="top">
128 <tbody>
129 <tr>
130 <td><p><span class="term"><em class="parameter"><code>address</code></em> :</span></p></td>
131 <td> a <a class="link" href="GInetAddress.html" title="GInetAddress"><span class="type">GInetAddress</span></a>
132 </td>
133 </tr>
134 <tr>
135 <td><p><span class="term"><em class="parameter"><code>port</code></em> :</span></p></td>
136 <td> a port number
137 </td>
138 </tr>
139 <tr>
140 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
141 <td> a new <a class="link" href="GInetSocketAddress.html" title="GInetSocketAddress"><span class="type">GInetSocketAddress</span></a>
142
143 </td>
144 </tr>
145 </tbody>
146 </table></div>
147 <p class="since">Since 2.22</p>
148 </div>
149 <hr>
150 <div class="refsect2" title="g_inet_socket_address_get_address ()">
151 <a name="g-inet-socket-address-get-address"></a><h3>g_inet_socket_address_get_address ()</h3>
152 <pre class="programlisting"><a class="link" href="GInetAddress.html" title="GInetAddress"><span class="returnvalue">GInetAddress</span></a> *      g_inet_socket_address_get_address   (<a class="link" href="GInetSocketAddress.html" title="GInetSocketAddress"><span class="returnvalue">GInetSocketAddress</span></a> *address);</pre>
153 <p>
154 Gets <em class="parameter"><code>address</code></em>'s <a class="link" href="GInetAddress.html" title="GInetAddress"><span class="type">GInetAddress</span></a>.</p>
155 <div class="variablelist"><table border="0">
156 <col align="left" valign="top">
157 <tbody>
158 <tr>
159 <td><p><span class="term"><em class="parameter"><code>address</code></em> :</span></p></td>
160 <td> a <a class="link" href="GInetSocketAddress.html" title="GInetSocketAddress"><span class="type">GInetSocketAddress</span></a>
161 </td>
162 </tr>
163 <tr>
164 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
165 <td> the <a class="link" href="GInetAddress.html" title="GInetAddress"><span class="type">GInetAddress</span></a> for <em class="parameter"><code>address</code></em>, which must be
166 <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-ref"><code class="function">g_object_ref()</code></a>'d if it will be stored
167
168 </td>
169 </tr>
170 </tbody>
171 </table></div>
172 <p class="since">Since 2.22</p>
173 </div>
174 <hr>
175 <div class="refsect2" title="g_inet_socket_address_get_port ()">
176 <a name="g-inet-socket-address-get-port"></a><h3>g_inet_socket_address_get_port ()</h3>
177 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint16"><span class="returnvalue">guint16</span></a>             g_inet_socket_address_get_port      (<a class="link" href="GInetSocketAddress.html" title="GInetSocketAddress"><span class="returnvalue">GInetSocketAddress</span></a> *address);</pre>
178 <p>
179 Gets <em class="parameter"><code>address</code></em>'s port.</p>
180 <div class="variablelist"><table border="0">
181 <col align="left" valign="top">
182 <tbody>
183 <tr>
184 <td><p><span class="term"><em class="parameter"><code>address</code></em> :</span></p></td>
185 <td> a <a class="link" href="GInetSocketAddress.html" title="GInetSocketAddress"><span class="type">GInetSocketAddress</span></a>
186 </td>
187 </tr>
188 <tr>
189 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
190 <td> the port for <em class="parameter"><code>address</code></em>
191
192 </td>
193 </tr>
194 </tbody>
195 </table></div>
196 <p class="since">Since 2.22</p>
197 </div>
198 </div>
199 <div class="refsect1" title="Property Details">
200 <a name="GInetSocketAddress.property-details"></a><h2>Property Details</h2>
201 <div class="refsect2" title='The "address" property'>
202 <a name="GInetSocketAddress--address"></a><h3>The <code class="literal">"address"</code> property</h3>
203 <pre class="programlisting">  "address"                  <a class="link" href="GInetAddress.html" title="GInetAddress"><span class="type">GInetAddress</span></a>*         : Read / Write / Construct Only</pre>
204 <p>The address.</p>
205 </div>
206 <hr>
207 <div class="refsect2" title='The "port" property'>
208 <a name="GInetSocketAddress--port"></a><h3>The <code class="literal">"port"</code> property</h3>
209 <pre class="programlisting">  "port"                     <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>                 : Read / Write / Construct Only</pre>
210 <p>The port.</p>
211 <p>Allowed values: &lt;= 65535</p>
212 <p>Default value: 0</p>
213 </div>
214 </div>
215 </div>
216 <div class="footer">
217 <hr>
218           Generated by GTK-Doc V1.13</div>
219 </body>
220 </html>