| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| <html> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>GUnixFDMessage</title> |
| <meta name="generator" content="DocBook XSL Stylesheets V1.75.2"> |
| <link rel="home" href="index.html" title="GIO Reference Manual"> |
| <link rel="up" href="networking.html" title="Lowlevel platform-independent network support"> |
| <link rel="prev" href="GUnixFDList.html" title="GUnixFDList"> |
| <link rel="next" href="resolver.html" title="DNS resolution"> |
| <meta name="generator" content="GTK-Doc V1.14 (XML mode)"> |
| <link rel="stylesheet" href="style.css" type="text/css"> |
| </head> |
| <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
| <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> |
| <tr valign="middle"> |
| <td><a accesskey="p" href="GUnixFDList.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td> |
| <td><a accesskey="u" href="networking.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td> |
| <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> |
| <th width="100%" align="center">GIO Reference Manual</th> |
| <td><a accesskey="n" href="resolver.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> |
| </tr> |
| <tr><td colspan="5" class="shortcuts"> |
| <a href="#GUnixFDMessage.synopsis" class="shortcut">Top</a> |
| | |
| <a href="#GUnixFDMessage.description" class="shortcut">Description</a> |
| | |
| <a href="#GUnixFDMessage.object-hierarchy" class="shortcut">Object Hierarchy</a> |
| | |
| <a href="#GUnixFDMessage.properties" class="shortcut">Properties</a> |
| </td></tr> |
| </table> |
| <div class="refentry" title="GUnixFDMessage"> |
| <a name="GUnixFDMessage"></a><div class="titlepage"></div> |
| <div class="refnamediv"><table width="100%"><tr> |
| <td valign="top"> |
| <h2><span class="refentrytitle"><a name="GUnixFDMessage.top_of_page"></a>GUnixFDMessage</span></h2> |
| <p>GUnixFDMessage — A GSocketControlMessage containing a <a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="type">GUnixFDList</span></a></p> |
| </td> |
| <td valign="top" align="right"></td> |
| </tr></table></div> |
| <div class="refsynopsisdiv" title="Synopsis"> |
| <a name="GUnixFDMessage.synopsis"></a><h2>Synopsis</h2> |
| <pre class="synopsis"> <a class="link" href="GUnixFDMessage.html#GUnixFDMessage-struct" title="GUnixFDMessage">GUnixFDMessage</a>; |
| <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> |
| (<em class="parameter"><code><a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="type">GUnixFDList</span></a> *fd_list</code></em>); |
| <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> (<em class="parameter"><code><span class="type">void</span></code></em>); |
| <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> (<em class="parameter"><code><a class="link" href="GUnixFDMessage.html" title="GUnixFDMessage"><span class="type">GUnixFDMessage</span></a> *message</code></em>); |
| <a href="/usr/share/gtk-doc/html/glib/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> (<em class="parameter"><code><a class="link" href="GUnixFDMessage.html" title="GUnixFDMessage"><span class="type">GUnixFDMessage</span></a> *message</code></em>, |
| <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> fd</code></em>, |
| <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>); |
| <a href="/usr/share/gtk-doc/html/glib/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> (<em class="parameter"><code><a class="link" href="GUnixFDMessage.html" title="GUnixFDMessage"><span class="type">GUnixFDMessage</span></a> *message</code></em>, |
| <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *length</code></em>); |
| </pre> |
| </div> |
| <div class="refsect1" title="Object Hierarchy"> |
| <a name="GUnixFDMessage.object-hierarchy"></a><h2>Object Hierarchy</h2> |
| <pre class="synopsis"> |
| <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a> |
| +----<a class="link" href="GSocketControlMessage.html" title="GSocketControlMessage">GSocketControlMessage</a> |
| +----GUnixFDMessage |
| </pre> |
| </div> |
| <div class="refsect1" title="Properties"> |
| <a name="GUnixFDMessage.properties"></a><h2>Properties</h2> |
| <pre class="synopsis"> |
| "<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 |
| </pre> |
| </div> |
| <div class="refsect1" title="Description"> |
| <a name="GUnixFDMessage.description"></a><h2>Description</h2> |
| <p> |
| This <a class="link" href="GSocketControlMessage.html" title="GSocketControlMessage"><span class="type">GSocketControlMessage</span></a> contains a <a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="type">GUnixFDList</span></a>. It may be sent |
| using <a class="link" href="GSocket.html#g-socket-send-message" title="g_socket_send_message ()"><code class="function">g_socket_send_message()</code></a> and received using |
| <a class="link" href="GSocket.html#g-socket-receive-message" title="g_socket_receive_message ()"><code class="function">g_socket_receive_message()</code></a> over UNIX sockets (ie: sockets in the |
| <code class="literal">G_SOCKET_ADDRESS_UNIX</code> family). The file descriptors are copied |
| between processes by the kernel. |
| </p> |
| <p> |
| For an easier way to send and receive file descriptors over |
| 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 |
| <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> |
| </div> |
| <div class="refsect1" title="Details"> |
| <a name="GUnixFDMessage.details"></a><h2>Details</h2> |
| <div class="refsect2" title="GUnixFDMessage"> |
| <a name="GUnixFDMessage-struct"></a><h3>GUnixFDMessage</h3> |
| <pre class="programlisting">typedef struct _GUnixFDMessage GUnixFDMessage;</pre> |
| <p> |
| </p> |
| </div> |
| <hr> |
| <div class="refsect2" title="g_unix_fd_message_new_with_fd_list ()"> |
| <a name="g-unix-fd-message-new-with-fd-list"></a><h3>g_unix_fd_message_new_with_fd_list ()</h3> |
| <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 |
| (<em class="parameter"><code><a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="type">GUnixFDList</span></a> *fd_list</code></em>);</pre> |
| <p> |
| 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> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>fd_list</code></em> :</span></p></td> |
| <td>a <a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="type">GUnixFDList</span></a> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td> a new <a class="link" href="GUnixFDMessage.html" title="GUnixFDMessage"><span class="type">GUnixFDMessage</span></a> |
| |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| <p class="since">Since 2.24</p> |
| </div> |
| <hr> |
| <div class="refsect2" title="g_unix_fd_message_new ()"> |
| <a name="g-unix-fd-message-new"></a><h3>g_unix_fd_message_new ()</h3> |
| <pre class="programlisting"><a class="link" href="GSocketControlMessage.html" title="GSocketControlMessage"><span class="returnvalue">GSocketControlMessage</span></a> * g_unix_fd_message_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> |
| <p> |
| Creates a new <a class="link" href="GUnixFDMessage.html" title="GUnixFDMessage"><span class="type">GUnixFDMessage</span></a> containing an empty file descriptor |
| list. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody><tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td> a new <a class="link" href="GUnixFDMessage.html" title="GUnixFDMessage"><span class="type">GUnixFDMessage</span></a> |
| |
| </td> |
| </tr></tbody> |
| </table></div> |
| <p class="since">Since 2.22</p> |
| </div> |
| <hr> |
| <div class="refsect2" title="g_unix_fd_message_get_fd_list ()"> |
| <a name="g-unix-fd-message-get-fd-list"></a><h3>g_unix_fd_message_get_fd_list ()</h3> |
| <pre class="programlisting"><a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="returnvalue">GUnixFDList</span></a> * g_unix_fd_message_get_fd_list (<em class="parameter"><code><a class="link" href="GUnixFDMessage.html" title="GUnixFDMessage"><span class="type">GUnixFDMessage</span></a> *message</code></em>);</pre> |
| <p> |
| 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 |
| return a reference to the caller, but the returned list is valid for |
| the lifetime of <em class="parameter"><code>message</code></em>. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>message</code></em> :</span></p></td> |
| <td>a <a class="link" href="GUnixFDMessage.html" title="GUnixFDMessage"><span class="type">GUnixFDMessage</span></a> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td> the <a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="type">GUnixFDList</span></a> from <em class="parameter"><code>message</code></em> |
| |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| <p class="since">Since 2.24</p> |
| </div> |
| <hr> |
| <div class="refsect2" title="g_unix_fd_message_append_fd ()"> |
| <a name="g-unix-fd-message-append-fd"></a><h3>g_unix_fd_message_append_fd ()</h3> |
| <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> g_unix_fd_message_append_fd (<em class="parameter"><code><a class="link" href="GUnixFDMessage.html" title="GUnixFDMessage"><span class="type">GUnixFDMessage</span></a> *message</code></em>, |
| <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> fd</code></em>, |
| <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre> |
| <p> |
| Adds a file descriptor to <em class="parameter"><code>message</code></em>. |
| </p> |
| <p> |
| The file descriptor is duplicated using <code class="function">dup()</code>. You keep your copy |
| of the descriptor and the copy contained in <em class="parameter"><code>message</code></em> will be closed |
| when <em class="parameter"><code>message</code></em> is finalized. |
| </p> |
| <p> |
| A possible cause of failure is exceeding the per-process or |
| system-wide file descriptor limit. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>message</code></em> :</span></p></td> |
| <td>a <a class="link" href="GUnixFDMessage.html" title="GUnixFDMessage"><span class="type">GUnixFDMessage</span></a> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>fd</code></em> :</span></p></td> |
| <td>a valid open file descriptor |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td> |
| <td>a <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> pointer |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> in case of success, else <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> (and <em class="parameter"><code>error</code></em> is set) |
| |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| <p class="since">Since 2.22</p> |
| </div> |
| <hr> |
| <div class="refsect2" title="g_unix_fd_message_steal_fds ()"> |
| <a name="g-unix-fd-message-steal-fds"></a><h3>g_unix_fd_message_steal_fds ()</h3> |
| <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> * g_unix_fd_message_steal_fds (<em class="parameter"><code><a class="link" href="GUnixFDMessage.html" title="GUnixFDMessage"><span class="type">GUnixFDMessage</span></a> *message</code></em>, |
| <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *length</code></em>);</pre> |
| <p> |
| Returns the array of file descriptors that is contained in this |
| object. |
| </p> |
| <p> |
| After this call, the descriptors are no longer contained in |
| <em class="parameter"><code>message</code></em>. Further calls will return an empty list (unless more |
| descriptors have been added). |
| </p> |
| <p> |
| The return result of this function must be freed with <a href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>. |
| The caller is also responsible for closing all of the file |
| descriptors. |
| </p> |
| <p> |
| If <em class="parameter"><code>length</code></em> is non-<a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> then it is set to the number of file |
| descriptors in the returned array. The returned array is also |
| terminated with -1. |
| </p> |
| <p> |
| This function never returns <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. In case there are no file |
| descriptors contained in <em class="parameter"><code>message</code></em>, an empty array is returned. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>message</code></em> :</span></p></td> |
| <td>a <a class="link" href="GUnixFDMessage.html" title="GUnixFDMessage"><span class="type">GUnixFDMessage</span></a> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td> |
| <td>pointer to the length of the returned array, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td> an array of file descriptors |
| |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| <p class="since">Since 2.22</p> |
| </div> |
| </div> |
| <div class="refsect1" title="Property Details"> |
| <a name="GUnixFDMessage.property-details"></a><h2>Property Details</h2> |
| <div class="refsect2" title='The "fd-list" property'> |
| <a name="GUnixFDMessage--fd-list"></a><h3>The <code class="literal">"fd-list"</code> property</h3> |
| <pre class="programlisting"> "fd-list" <a class="link" href="GUnixFDList.html" title="GUnixFDList"><span class="type">GUnixFDList</span></a>* : Read / Write / Construct Only</pre> |
| <p>The GUnixFDList object to send with the message.</p> |
| </div> |
| </div> |
| <div class="refsect1" title="See Also"> |
| <a name="GUnixFDMessage.see-also"></a><h2>See Also</h2> |
| <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> |
| </div> |
| </div> |
| <div class="footer"> |
| <hr> |
| Generated by GTK-Doc V1.14</div> |
| </body> |
| </html> |