4
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
<title>GUnixFDMessage</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
6
<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
7
7
<link rel="home" href="index.html" title="GIO Reference Manual">
8
8
<link rel="up" href="networking.html" title="Lowlevel platform-independent network support">
9
9
<link rel="prev" href="GUnixFDList.html" title="GUnixFDList">
10
10
<link rel="next" href="resolver.html" title="DNS resolution">
11
<meta name="generator" content="GTK-Doc V1.13 (XML mode)">
11
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
13
<link rel="part" href="pt01.html" title="Part I. GIO Overview">
14
14
<link rel="chapter" href="ch01.html" title="Introduction">
53
53
<tr><td colspan="5" class="shortcuts">
54
54
<a href="#GUnixFDMessage.synopsis" class="shortcut">Top</a>
56
<a href="#GUnixFDMessage.description" class="shortcut">Description</a>
58
<a href="#GUnixFDMessage.object-hierarchy" class="shortcut">Object Hierarchy</a>
60
<a href="#GUnixFDMessage.properties" class="shortcut">Properties</a>
56
<a href="#GUnixFDMessage.description" class="shortcut">Description</a>
58
<a href="#GUnixFDMessage.object-hierarchy" class="shortcut">Object Hierarchy</a>
60
<a href="#GUnixFDMessage.properties" class="shortcut">Properties</a>
63
63
<div class="refentry" title="GUnixFDMessage">
71
71
</tr></table></div>
72
72
<div class="refsynopsisdiv" title="Synopsis">
73
73
<a name="GUnixFDMessage.synopsis"></a><h2>Synopsis</h2>
74
<pre class="synopsis"> <a class="link" href="GUnixFDMessage.html#GUnixFDMessage-struct" title="GUnixFDMessage">GUnixFDMessage</a>;
75
<a class="link" href="GSocketControlMessage.html" title="GSocketControlMessage"><span class="returnvalue">GSocketControlMessage</span></a> * <a class="link" href="GUnixFDMessage.html#g-unix-fd-message-new-with-fd-list" title="g_unix_fd_message_new_with_fd_list ()">g_unix_fd_message_new_with_fd_list</a>
76
(<a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="returnvalue">GUnixFDList</span></a> *fd_list);
77
<a class="link" href="GSocketControlMessage.html" title="GSocketControlMessage"><span class="returnvalue">GSocketControlMessage</span></a> * <a class="link" href="GUnixFDMessage.html#g-unix-fd-message-new" title="g_unix_fd_message_new ()">g_unix_fd_message_new</a> (void);
78
<a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="returnvalue">GUnixFDList</span></a> * <a class="link" href="GUnixFDMessage.html#g-unix-fd-message-get-fd-list" title="g_unix_fd_message_get_fd_list ()">g_unix_fd_message_get_fd_list</a> (<a class="link" href="GUnixFDMessage.html" title="GUnixFDMessage"><span class="returnvalue">GUnixFDMessage</span></a> *message);
79
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GUnixFDMessage.html#g-unix-fd-message-append-fd" title="g_unix_fd_message_append_fd ()">g_unix_fd_message_append_fd</a> (<a class="link" href="GUnixFDMessage.html" title="GUnixFDMessage"><span class="returnvalue">GUnixFDMessage</span></a> *message,
80
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> fd,
81
<a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="returnvalue">GError</span></a> **error);
82
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> * <a class="link" href="GUnixFDMessage.html#g-unix-fd-message-steal-fds" title="g_unix_fd_message_steal_fds ()">g_unix_fd_message_steal_fds</a> (<a class="link" href="GUnixFDMessage.html" title="GUnixFDMessage"><span class="returnvalue">GUnixFDMessage</span></a> *message,
83
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> *length);
74
<pre class="synopsis">
75
<a class="link" href="GUnixFDMessage.html#GUnixFDMessage-struct" title="GUnixFDMessage">GUnixFDMessage</a>;
76
<a class="link" href="GSocketControlMessage.html" title="GSocketControlMessage">GSocketControlMessage</a> * <a class="link" href="GUnixFDMessage.html#g-unix-fd-message-new-with-fd-list" title="g_unix_fd_message_new_with_fd_list ()">g_unix_fd_message_new_with_fd_list</a>
77
(<a class="link" href="GUnixFDList.html" title="GUnixFDList">GUnixFDList</a> *fd_list);
78
<a class="link" href="GSocketControlMessage.html" title="GSocketControlMessage">GSocketControlMessage</a> * <a class="link" href="GUnixFDMessage.html#g-unix-fd-message-new" title="g_unix_fd_message_new ()">g_unix_fd_message_new</a> (void);
79
<a class="link" href="GUnixFDList.html" title="GUnixFDList">GUnixFDList</a> * <a class="link" href="GUnixFDMessage.html#g-unix-fd-message-get-fd-list" title="g_unix_fd_message_get_fd_list ()">g_unix_fd_message_get_fd_list</a> (<a class="link" href="GUnixFDMessage.html" title="GUnixFDMessage">GUnixFDMessage</a> *message);
81
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
82
>gboolean</a> <a class="link" href="GUnixFDMessage.html#g-unix-fd-message-append-fd" title="g_unix_fd_message_append_fd ()">g_unix_fd_message_append_fd</a> (<a class="link" href="GUnixFDMessage.html" title="GUnixFDMessage">GUnixFDMessage</a> *message,
84
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
87
href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"
90
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
91
>gint</a> * <a class="link" href="GUnixFDMessage.html#g-unix-fd-message-steal-fds" title="g_unix_fd_message_steal_fds ()">g_unix_fd_message_steal_fds</a> (<a class="link" href="GUnixFDMessage.html" title="GUnixFDMessage">GUnixFDMessage</a> *message,
93
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
86
97
<div class="refsect1" title="Object Hierarchy">
87
98
<a name="GUnixFDMessage.object-hierarchy"></a><h2>Object Hierarchy</h2>
88
99
<pre class="synopsis">
89
<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
90
101
+----<a class="link" href="GSocketControlMessage.html" title="GSocketControlMessage">GSocketControlMessage</a>
91
102
+----GUnixFDMessage
94
105
<div class="refsect1" title="Properties">
95
106
<a name="GUnixFDMessage.properties"></a><h2>Properties</h2>
96
107
<pre class="synopsis">
97
"<a class="link" href="GUnixFDMessage.html#GUnixFDMessage--fd-list" title='The "fd-list" property'>fd-list</a>" <a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="type">GUnixFDList</span></a>* : Read / Write / Construct Only
108
"<a class="link" href="GUnixFDMessage.html#GUnixFDMessage--fd-list" title='The "fd-list" property'>fd-list</a>" <a class="link" href="GUnixFDList.html" title="GUnixFDList">GUnixFDList</a>* : Read / Write / Construct Only
100
111
<div class="refsect1" title="Description">
110
121
For an easier way to send and receive file descriptors over
111
122
stream-oriented UNIX sockets, see <a class="link" href="GSocketConnection.html#g-unix-connection-send-fd" title="g_unix_connection_send_fd ()"><code class="function">g_unix_connection_send_fd()</code></a> and
112
123
<a class="link" href="GSocketConnection.html#g-unix-connection-receive-fd" title="g_unix_connection_receive_fd ()"><code class="function">g_unix_connection_receive_fd()</code></a>.</p>
114
127
<div class="refsect1" title="Details">
115
128
<a name="GUnixFDMessage.details"></a><h2>Details</h2>
123
136
<div class="refsect2" title="g_unix_fd_message_new_with_fd_list ()">
124
137
<a name="g-unix-fd-message-new-with-fd-list"></a><h3>g_unix_fd_message_new_with_fd_list ()</h3>
125
<pre class="programlisting"><a class="link" href="GSocketControlMessage.html" title="GSocketControlMessage"><span class="returnvalue">GSocketControlMessage</span></a> * g_unix_fd_message_new_with_fd_list
126
(<a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="returnvalue">GUnixFDList</span></a> *fd_list);</pre>
138
<pre class="programlisting"><a class="link" href="GSocketControlMessage.html" title="GSocketControlMessage">GSocketControlMessage</a> * g_unix_fd_message_new_with_fd_list
139
(<a class="link" href="GUnixFDList.html" title="GUnixFDList">GUnixFDList</a> *fd_list);</pre>
128
141
Creates a new <a class="link" href="GUnixFDMessage.html" title="GUnixFDMessage"><span class="type">GUnixFDMessage</span></a> containing <em class="parameter"><code>list</code></em>.</p>
129
144
<div class="variablelist"><table border="0">
130
145
<col align="left" valign="top">
148
163
<div class="refsect2" title="g_unix_fd_message_new ()">
149
164
<a name="g-unix-fd-message-new"></a><h3>g_unix_fd_message_new ()</h3>
150
<pre class="programlisting"><a class="link" href="GSocketControlMessage.html" title="GSocketControlMessage"><span class="returnvalue">GSocketControlMessage</span></a> * g_unix_fd_message_new (void);</pre>
165
<pre class="programlisting"><a class="link" href="GSocketControlMessage.html" title="GSocketControlMessage">GSocketControlMessage</a> * g_unix_fd_message_new (void);</pre>
152
167
Creates a new <a class="link" href="GUnixFDMessage.html" title="GUnixFDMessage"><span class="type">GUnixFDMessage</span></a> containing an empty file descriptor
154
171
<div class="variablelist"><table border="0">
155
172
<col align="left" valign="top">
166
183
<div class="refsect2" title="g_unix_fd_message_get_fd_list ()">
167
184
<a name="g-unix-fd-message-get-fd-list"></a><h3>g_unix_fd_message_get_fd_list ()</h3>
168
<pre class="programlisting"><a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="returnvalue">GUnixFDList</span></a> * g_unix_fd_message_get_fd_list (<a class="link" href="GUnixFDMessage.html" title="GUnixFDMessage"><span class="returnvalue">GUnixFDMessage</span></a> *message);</pre>
185
<pre class="programlisting"><a class="link" href="GUnixFDList.html" title="GUnixFDList">GUnixFDList</a> * g_unix_fd_message_get_fd_list (<a class="link" href="GUnixFDMessage.html" title="GUnixFDMessage">GUnixFDMessage</a> *message);</pre>
170
187
Gets the <a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="type">GUnixFDList</span></a> contained in <em class="parameter"><code>message</code></em>. This function does not
171
188
return a reference to the caller, but the returned list is valid for
172
189
the lifetime of <em class="parameter"><code>message</code></em>.</p>
173
192
<div class="variablelist"><table border="0">
174
193
<col align="left" valign="top">
192
211
<div class="refsect2" title="g_unix_fd_message_append_fd ()">
193
212
<a name="g-unix-fd-message-append-fd"></a><h3>g_unix_fd_message_append_fd ()</h3>
194
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> g_unix_fd_message_append_fd (<a class="link" href="GUnixFDMessage.html" title="GUnixFDMessage"><span class="returnvalue">GUnixFDMessage</span></a> *message,
195
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> fd,
196
<a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="returnvalue">GError</span></a> **error);</pre>
213
<pre class="programlisting"><a
214
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
215
>gboolean</a> g_unix_fd_message_append_fd (<a class="link" href="GUnixFDMessage.html" title="GUnixFDMessage">GUnixFDMessage</a> *message,
217
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
220
href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"
221
>GError</a> **error);</pre>
198
223
Adds a file descriptor to <em class="parameter"><code>message</code></em>.
222
249
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
223
<td> a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> pointer
251
href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"
252
><span class="type">GError</span></a> pointer
227
256
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
228
<td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> in case of success, else <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> (and <em class="parameter"><code>error</code></em> is set)
258
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
259
><code class="literal">TRUE</code></a> in case of success, else <a
260
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
261
><code class="literal">FALSE</code></a> (and <em class="parameter"><code>error</code></em> is set)
237
270
<div class="refsect2" title="g_unix_fd_message_steal_fds ()">
238
271
<a name="g-unix-fd-message-steal-fds"></a><h3>g_unix_fd_message_steal_fds ()</h3>
239
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> * g_unix_fd_message_steal_fds (<a class="link" href="GUnixFDMessage.html" title="GUnixFDMessage"><span class="returnvalue">GUnixFDMessage</span></a> *message,
240
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> *length);</pre>
272
<pre class="programlisting"><a
273
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
274
>gint</a> * g_unix_fd_message_steal_fds (<a class="link" href="GUnixFDMessage.html" title="GUnixFDMessage">GUnixFDMessage</a> *message,
276
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
277
>gint</a> *length);</pre>
242
279
Returns the array of file descriptors that is contained in this
248
285
descriptors have been added).
251
The return result of this function must be freed with <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>.
288
The return result of this function must be freed with <a
289
href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"
290
><code class="function">g_free()</code></a>.
252
291
The caller is also responsible for closing all of the file
256
If <em class="parameter"><code>length</code></em> is non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> then it is set to the number of file
295
If <em class="parameter"><code>length</code></em> is non-<a
296
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
297
><code class="literal">NULL</code></a> then it is set to the number of file
257
298
descriptors in the returned array. The returned array is also
258
299
terminated with -1.
261
This function never returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. In case there are no file
302
This function never returns <a
303
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
304
><code class="literal">NULL</code></a>. In case there are no file
262
305
descriptors contained in <em class="parameter"><code>message</code></em>, an empty array is returned.</p>
263
308
<div class="variablelist"><table border="0">
264
309
<col align="left" valign="top">
272
317
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
273
<td> pointer to the length of the returned array, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
318
<td> pointer to the length of the returned array, or <a
319
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
320
><code class="literal">NULL</code></a>
288
335
<a name="GUnixFDMessage.property-details"></a><h2>Property Details</h2>
289
336
<div class="refsect2" title='The "fd-list" property'>
290
337
<a name="GUnixFDMessage--fd-list"></a><h3>The <code class="literal">"fd-list"</code> property</h3>
291
<pre class="programlisting"> "fd-list" <a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="type">GUnixFDList</span></a>* : Read / Write / Construct Only</pre>
338
<pre class="programlisting"> "fd-list" <a class="link" href="GUnixFDList.html" title="GUnixFDList">GUnixFDList</a>* : Read / Write / Construct Only</pre>
292
339
<p>The GUnixFDList object to send with the message.</p>
295
342
<div class="refsect1" title="See Also">
296
343
<a name="GUnixFDMessage.see-also"></a><h2>See Also</h2>
297
<a class="link" href="GSocketConnection.html#GUnixConnection"><span class="type">GUnixConnection</span></a>, <a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="type">GUnixFDList</span></a>, <a class="link" href="GSocketControlMessage.html" title="GSocketControlMessage"><span class="type">GSocketControlMessage</span></a>
344
#GUnixConnection, <a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="type">GUnixFDList</span></a>, <a class="link" href="GSocketControlMessage.html" title="GSocketControlMessage"><span class="type">GSocketControlMessage</span></a>
300
347
<div class="footer">
302
Generated by GTK-Doc V1.13</div>
349
Generated by GTK-Doc V1.11</div>
b'\\ No newline at end of file'