Tizen 2.1 base
[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.76.1">
7 <link rel="home" href="index.html" title="GIO Reference Manual">
8 <link rel="up" href="networking.html" title="Low-level 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.18 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
16 <tr valign="middle">
17 <td><a accesskey="p" href="GSocketAddress.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="networking.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">GIO Reference Manual</th>
21 <td><a accesskey="n" href="GUnixSocketAddress.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
22 </tr>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#GInetSocketAddress.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#GInetSocketAddress.description" class="shortcut">Description</a>
27                    | 
28                   <a href="#GInetSocketAddress.object-hierarchy" class="shortcut">Object Hierarchy</a>
29                    | 
30                   <a href="#GInetSocketAddress.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
31                    | 
32                   <a href="#GInetSocketAddress.properties" class="shortcut">Properties</a>
33 </td></tr>
34 </table>
35 <div class="refentry">
36 <a name="GInetSocketAddress"></a><div class="titlepage"></div>
37 <div class="refnamediv"><table width="100%"><tr>
38 <td valign="top">
39 <h2><span class="refentrytitle"><a name="GInetSocketAddress.top_of_page"></a>GInetSocketAddress</span></h2>
40 <p>GInetSocketAddress — Internet GSocketAddress</p>
41 </td>
42 <td valign="top" align="right"></td>
43 </tr></table></div>
44 <div class="refsynopsisdiv">
45 <a name="GInetSocketAddress.synopsis"></a><h2>Synopsis</h2>
46 <pre class="synopsis">                    <a class="link" href="GInetSocketAddress.html#GInetSocketAddress-struct" title="GInetSocketAddress">GInetSocketAddress</a>;
47 <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>           (<em class="parameter"><code><a class="link" href="GInetAddress.html" title="GInetAddress"><span class="type">GInetAddress</span></a> *address</code></em>,
48                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#guint16"><span class="type">guint16</span></a> port</code></em>);
49 <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>   (<em class="parameter"><code><a class="link" href="GInetSocketAddress.html" title="GInetSocketAddress"><span class="type">GInetSocketAddress</span></a> *address</code></em>);
50 <a href="./../glib/glib/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>      (<em class="parameter"><code><a class="link" href="GInetSocketAddress.html" title="GInetSocketAddress"><span class="type">GInetSocketAddress</span></a> *address</code></em>);
51 <a href="./../glib/glib/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a>             <a class="link" href="GInetSocketAddress.html#g-inet-socket-address-get-flowinfo" title="g_inet_socket_address_get_flowinfo ()">g_inet_socket_address_get_flowinfo</a>  (<em class="parameter"><code><a class="link" href="GInetSocketAddress.html" title="GInetSocketAddress"><span class="type">GInetSocketAddress</span></a> *address</code></em>);
52 <a href="./../glib/glib/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a>             <a class="link" href="GInetSocketAddress.html#g-inet-socket-address-get-scope-id" title="g_inet_socket_address_get_scope_id ()">g_inet_socket_address_get_scope_id</a>  (<em class="parameter"><code><a class="link" href="GInetSocketAddress.html" title="GInetSocketAddress"><span class="type">GInetSocketAddress</span></a> *address</code></em>);
53 </pre>
54 </div>
55 <div class="refsect1">
56 <a name="GInetSocketAddress.object-hierarchy"></a><h2>Object Hierarchy</h2>
57 <pre class="synopsis">
58   <a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a>
59    +----<a class="link" href="GSocketAddress.html" title="GSocketAddress">GSocketAddress</a>
60          +----GInetSocketAddress
61                +----<a class="link" href="GProxyAddress.html" title="GProxyAddress">GProxyAddress</a>
62 </pre>
63 </div>
64 <div class="refsect1">
65 <a name="GInetSocketAddress.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
66 <p>
67 GInetSocketAddress implements
68  <a class="link" href="GSocketConnectable.html" title="GSocketConnectable">GSocketConnectable</a>.</p>
69 </div>
70 <div class="refsect1">
71 <a name="GInetSocketAddress.properties"></a><h2>Properties</h2>
72 <pre class="synopsis">
73   "<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
74   "<a class="link" href="GInetSocketAddress.html#GInetSocketAddress--flowinfo" title='The "flowinfo" property'>flowinfo</a>"                 <a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a>                 : Read / Write / Construct Only
75   "<a class="link" href="GInetSocketAddress.html#GInetSocketAddress--port" title='The "port" property'>port</a>"                     <a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a>                 : Read / Write / Construct Only
76   "<a class="link" href="GInetSocketAddress.html#GInetSocketAddress--scope-id" title='The "scope-id" property'>scope-id</a>"                 <a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a>                 : Read / Write / Construct Only
77 </pre>
78 </div>
79 <div class="refsect1">
80 <a name="GInetSocketAddress.description"></a><h2>Description</h2>
81 <p>
82 An IPv4 or IPv6 socket address; that is, the combination of a
83 <a class="link" href="GInetAddress.html" title="GInetAddress"><span class="type">GInetAddress</span></a> and a port number.
84 </p>
85 </div>
86 <div class="refsect1">
87 <a name="GInetSocketAddress.details"></a><h2>Details</h2>
88 <div class="refsect2">
89 <a name="GInetSocketAddress-struct"></a><h3>GInetSocketAddress</h3>
90 <pre class="programlisting">typedef struct _GInetSocketAddress GInetSocketAddress;</pre>
91 <p>
92 An IPv4 or IPv6 socket address, corresponding to a <span class="type">struct
93 sockaddr_in</span> or <span class="type">struct sockaddr_in6</span>.
94 </p>
95 </div>
96 <hr>
97 <div class="refsect2">
98 <a name="g-inet-socket-address-new"></a><h3>g_inet_socket_address_new ()</h3>
99 <pre class="programlisting"><a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="returnvalue">GSocketAddress</span></a> *    g_inet_socket_address_new           (<em class="parameter"><code><a class="link" href="GInetAddress.html" title="GInetAddress"><span class="type">GInetAddress</span></a> *address</code></em>,
100                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#guint16"><span class="type">guint16</span></a> port</code></em>);</pre>
101 <p>
102 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>.
103 </p>
104 <div class="variablelist"><table border="0">
105 <col align="left" valign="top">
106 <tbody>
107 <tr>
108 <td><p><span class="term"><em class="parameter"><code>address</code></em> :</span></p></td>
109 <td>a <a class="link" href="GInetAddress.html" title="GInetAddress"><span class="type">GInetAddress</span></a>
110 </td>
111 </tr>
112 <tr>
113 <td><p><span class="term"><em class="parameter"><code>port</code></em> :</span></p></td>
114 <td>a port number</td>
115 </tr>
116 <tr>
117 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
118 <td>a new <a class="link" href="GInetSocketAddress.html" title="GInetSocketAddress"><span class="type">GInetSocketAddress</span></a>
119 </td>
120 </tr>
121 </tbody>
122 </table></div>
123 <p class="since">Since 2.22</p>
124 </div>
125 <hr>
126 <div class="refsect2">
127 <a name="g-inet-socket-address-get-address"></a><h3>g_inet_socket_address_get_address ()</h3>
128 <pre class="programlisting"><a class="link" href="GInetAddress.html" title="GInetAddress"><span class="returnvalue">GInetAddress</span></a> *      g_inet_socket_address_get_address   (<em class="parameter"><code><a class="link" href="GInetSocketAddress.html" title="GInetSocketAddress"><span class="type">GInetSocketAddress</span></a> *address</code></em>);</pre>
129 <p>
130 Gets <em class="parameter"><code>address</code></em>'s <a class="link" href="GInetAddress.html" title="GInetAddress"><span class="type">GInetAddress</span></a>.
131 </p>
132 <div class="variablelist"><table border="0">
133 <col align="left" valign="top">
134 <tbody>
135 <tr>
136 <td><p><span class="term"><em class="parameter"><code>address</code></em> :</span></p></td>
137 <td>a <a class="link" href="GInetSocketAddress.html" title="GInetSocketAddress"><span class="type">GInetSocketAddress</span></a>
138 </td>
139 </tr>
140 <tr>
141 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
142 <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
143 <a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#g-object-ref"><code class="function">g_object_ref()</code></a>'d if it will be stored. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
144 </td>
145 </tr>
146 </tbody>
147 </table></div>
148 <p class="since">Since 2.22</p>
149 </div>
150 <hr>
151 <div class="refsect2">
152 <a name="g-inet-socket-address-get-port"></a><h3>g_inet_socket_address_get_port ()</h3>
153 <pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#guint16"><span class="returnvalue">guint16</span></a>             g_inet_socket_address_get_port      (<em class="parameter"><code><a class="link" href="GInetSocketAddress.html" title="GInetSocketAddress"><span class="type">GInetSocketAddress</span></a> *address</code></em>);</pre>
154 <p>
155 Gets <em class="parameter"><code>address</code></em>'s port.
156 </p>
157 <div class="variablelist"><table border="0">
158 <col align="left" valign="top">
159 <tbody>
160 <tr>
161 <td><p><span class="term"><em class="parameter"><code>address</code></em> :</span></p></td>
162 <td>a <a class="link" href="GInetSocketAddress.html" title="GInetSocketAddress"><span class="type">GInetSocketAddress</span></a>
163 </td>
164 </tr>
165 <tr>
166 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
167 <td>the port for <em class="parameter"><code>address</code></em>
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">
176 <a name="g-inet-socket-address-get-flowinfo"></a><h3>g_inet_socket_address_get_flowinfo ()</h3>
177 <pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a>             g_inet_socket_address_get_flowinfo  (<em class="parameter"><code><a class="link" href="GInetSocketAddress.html" title="GInetSocketAddress"><span class="type">GInetSocketAddress</span></a> *address</code></em>);</pre>
178 <p>
179 Gets the <code class="literal">sin6_flowinfo</code> field from <em class="parameter"><code>address</code></em>,
180 which must be an IPv6 address.
181 </p>
182 <div class="variablelist"><table border="0">
183 <col align="left" valign="top">
184 <tbody>
185 <tr>
186 <td><p><span class="term"><em class="parameter"><code>address</code></em> :</span></p></td>
187 <td>a <a class="link" href="GSocketAddress.html#G-SOCKET-FAMILY-IPV6:CAPS"><code class="literal">G_SOCKET_FAMILY_IPV6</code></a> <a class="link" href="GInetSocketAddress.html" title="GInetSocketAddress"><span class="type">GInetSocketAddress</span></a>
188 </td>
189 </tr>
190 <tr>
191 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
192 <td>the flowinfo field</td>
193 </tr>
194 </tbody>
195 </table></div>
196 <p class="since">Since 2.32</p>
197 </div>
198 <hr>
199 <div class="refsect2">
200 <a name="g-inet-socket-address-get-scope-id"></a><h3>g_inet_socket_address_get_scope_id ()</h3>
201 <pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a>             g_inet_socket_address_get_scope_id  (<em class="parameter"><code><a class="link" href="GInetSocketAddress.html" title="GInetSocketAddress"><span class="type">GInetSocketAddress</span></a> *address</code></em>);</pre>
202 <p>
203 Gets the <code class="literal">sin6_scope_id</code> field from <em class="parameter"><code>address</code></em>,
204 which must be an IPv6 address.
205 </p>
206 <div class="variablelist"><table border="0">
207 <col align="left" valign="top">
208 <tbody>
209 <tr>
210 <td><p><span class="term"><em class="parameter"><code>address</code></em> :</span></p></td>
211 <td>a <a class="link" href="GSocketAddress.html#G-SOCKET-FAMILY-IPV6:CAPS"><code class="literal">G_SOCKET_FAMILY_IPV6</code></a> <a class="link" href="GInetAddress.html" title="GInetAddress"><span class="type">GInetAddress</span></a>
212 </td>
213 </tr>
214 <tr>
215 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
216 <td>the scope id field</td>
217 </tr>
218 </tbody>
219 </table></div>
220 <p class="since">Since 2.32</p>
221 </div>
222 </div>
223 <div class="refsect1">
224 <a name="GInetSocketAddress.property-details"></a><h2>Property Details</h2>
225 <div class="refsect2">
226 <a name="GInetSocketAddress--address"></a><h3>The <code class="literal">"address"</code> property</h3>
227 <pre class="programlisting">  "address"                  <a class="link" href="GInetAddress.html" title="GInetAddress"><span class="type">GInetAddress</span></a>*         : Read / Write / Construct Only</pre>
228 <p>The address.</p>
229 </div>
230 <hr>
231 <div class="refsect2">
232 <a name="GInetSocketAddress--flowinfo"></a><h3>The <code class="literal">"flowinfo"</code> property</h3>
233 <pre class="programlisting">  "flowinfo"                 <a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a>                 : Read / Write / Construct Only</pre>
234 <p>
235 The <code class="literal">sin6_flowinfo</code> field, for IPv6 addresses.
236 </p>
237 <p>Default value: 0</p>
238 <p class="since">Since 2.32</p>
239 </div>
240 <hr>
241 <div class="refsect2">
242 <a name="GInetSocketAddress--port"></a><h3>The <code class="literal">"port"</code> property</h3>
243 <pre class="programlisting">  "port"                     <a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a>                 : Read / Write / Construct Only</pre>
244 <p>The port.</p>
245 <p>Allowed values: &lt;= 65535</p>
246 <p>Default value: 0</p>
247 </div>
248 <hr>
249 <div class="refsect2">
250 <a name="GInetSocketAddress--scope-id"></a><h3>The <code class="literal">"scope-id"</code> property</h3>
251 <pre class="programlisting">  "scope-id"                 <a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a>                 : Read / Write / Construct Only</pre>
252 <p>IPv6 scope ID.</p>
253 <p>Default value: 0</p>
254 </div>
255 </div>
256 </div>
257 <div class="footer">
258 <hr>
259           Generated by GTK-Doc V1.18</div>
260 </body>
261 </html>