Tizen 2.1 base
[platform/upstream/glib2.0.git] / docs / reference / gio / html / GUnixSocketAddress.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>GUnixSocketAddress</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="GInetSocketAddress.html" title="GInetSocketAddress">
10 <link rel="next" href="GSocketControlMessage.html" title="GSocketControlMessage">
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="GInetSocketAddress.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="GSocketControlMessage.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="#GUnixSocketAddress.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#GUnixSocketAddress.description" class="shortcut">Description</a>
27                    | 
28                   <a href="#GUnixSocketAddress.object-hierarchy" class="shortcut">Object Hierarchy</a>
29                    | 
30                   <a href="#GUnixSocketAddress.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
31                    | 
32                   <a href="#GUnixSocketAddress.properties" class="shortcut">Properties</a>
33 </td></tr>
34 </table>
35 <div class="refentry">
36 <a name="GUnixSocketAddress"></a><div class="titlepage"></div>
37 <div class="refnamediv"><table width="100%"><tr>
38 <td valign="top">
39 <h2><span class="refentrytitle"><a name="GUnixSocketAddress.top_of_page"></a>GUnixSocketAddress</span></h2>
40 <p>GUnixSocketAddress — UNIX GSocketAddress</p>
41 </td>
42 <td valign="top" align="right"></td>
43 </tr></table></div>
44 <div class="refsynopsisdiv">
45 <a name="GUnixSocketAddress.synopsis"></a><h2>Synopsis</h2>
46 <pre class="synopsis">
47 #include &lt;gio/gunixsocketaddress.h&gt;
48
49 struct              <a class="link" href="GUnixSocketAddress.html#GUnixSocketAddress-struct" title="struct GUnixSocketAddress">GUnixSocketAddress</a>;
50 enum                <a class="link" href="GUnixSocketAddress.html#GUnixSocketAddressType" title="enum GUnixSocketAddressType">GUnixSocketAddressType</a>;
51 <a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="returnvalue">GSocketAddress</span></a> *    <a class="link" href="GUnixSocketAddress.html#g-unix-socket-address-new" title="g_unix_socket_address_new ()">g_unix_socket_address_new</a>           (<em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *path</code></em>);
52 <a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="returnvalue">GSocketAddress</span></a> *    <a class="link" href="GUnixSocketAddress.html#g-unix-socket-address-new-abstract" title="g_unix_socket_address_new_abstract ()">g_unix_socket_address_new_abstract</a>  (<em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *path</code></em>,
53                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> path_len</code></em>);
54 <a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="returnvalue">GSocketAddress</span></a> *    <a class="link" href="GUnixSocketAddress.html#g-unix-socket-address-new-with-type" title="g_unix_socket_address_new_with_type ()">g_unix_socket_address_new_with_type</a> (<em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *path</code></em>,
55                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> path_len</code></em>,
56                                                          <em class="parameter"><code><a class="link" href="GUnixSocketAddress.html#GUnixSocketAddressType" title="enum GUnixSocketAddressType"><span class="type">GUnixSocketAddressType</span></a> type</code></em>);
57 <a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="GUnixSocketAddress.html#g-unix-socket-address-get-is-abstract" title="g_unix_socket_address_get_is_abstract ()">g_unix_socket_address_get_is_abstract</a>
58                                                         (<em class="parameter"><code><a class="link" href="GUnixSocketAddress.html" title="GUnixSocketAddress"><span class="type">GUnixSocketAddress</span></a> *address</code></em>);
59 <a class="link" href="GUnixSocketAddress.html#GUnixSocketAddressType" title="enum GUnixSocketAddressType"><span class="returnvalue">GUnixSocketAddressType</span></a> <a class="link" href="GUnixSocketAddress.html#g-unix-socket-address-get-address-type" title="g_unix_socket_address_get_address_type ()">g_unix_socket_address_get_address_type</a>
60                                                         (<em class="parameter"><code><a class="link" href="GUnixSocketAddress.html" title="GUnixSocketAddress"><span class="type">GUnixSocketAddress</span></a> *address</code></em>);
61 const <span class="returnvalue">char</span> *        <a class="link" href="GUnixSocketAddress.html#g-unix-socket-address-get-path" title="g_unix_socket_address_get_path ()">g_unix_socket_address_get_path</a>      (<em class="parameter"><code><a class="link" href="GUnixSocketAddress.html" title="GUnixSocketAddress"><span class="type">GUnixSocketAddress</span></a> *address</code></em>);
62 <a href="./../glib/glib/glib-Basic-Types.html#gsize"><span class="returnvalue">gsize</span></a>               <a class="link" href="GUnixSocketAddress.html#g-unix-socket-address-get-path-len" title="g_unix_socket_address_get_path_len ()">g_unix_socket_address_get_path_len</a>  (<em class="parameter"><code><a class="link" href="GUnixSocketAddress.html" title="GUnixSocketAddress"><span class="type">GUnixSocketAddress</span></a> *address</code></em>);
63 <a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="GUnixSocketAddress.html#g-unix-socket-address-abstract-names-supported" title="g_unix_socket_address_abstract_names_supported ()">g_unix_socket_address_abstract_names_supported</a>
64                                                         (<em class="parameter"><code><span class="type">void</span></code></em>);
65 </pre>
66 </div>
67 <div class="refsect1">
68 <a name="GUnixSocketAddress.object-hierarchy"></a><h2>Object Hierarchy</h2>
69 <pre class="synopsis">
70   <a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a>
71    +----<a class="link" href="GSocketAddress.html" title="GSocketAddress">GSocketAddress</a>
72          +----GUnixSocketAddress
73 </pre>
74 </div>
75 <div class="refsect1">
76 <a name="GUnixSocketAddress.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
77 <p>
78 GUnixSocketAddress implements
79  <a class="link" href="GSocketConnectable.html" title="GSocketConnectable">GSocketConnectable</a>.</p>
80 </div>
81 <div class="refsect1">
82 <a name="GUnixSocketAddress.properties"></a><h2>Properties</h2>
83 <pre class="synopsis">
84   "<a class="link" href="GUnixSocketAddress.html#GUnixSocketAddress--abstract" title='The "abstract" property'>abstract</a>"                 <a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write / Construct Only
85   "<a class="link" href="GUnixSocketAddress.html#GUnixSocketAddress--address-type" title='The "address-type" property'>address-type</a>"             <a class="link" href="GUnixSocketAddress.html#GUnixSocketAddressType" title="enum GUnixSocketAddressType"><span class="type">GUnixSocketAddressType</span></a>  : Read / Write / Construct Only
86   "<a class="link" href="GUnixSocketAddress.html#GUnixSocketAddress--path" title='The "path" property'>path</a>"                     <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct Only
87   "<a class="link" href="GUnixSocketAddress.html#GUnixSocketAddress--path-as-array" title='The "path-as-array" property'>path-as-array</a>"            <a href="./../glib/glib/glib-Byte-Arrays.html#GByteArray"><span class="type">GByteArray</span></a>*           : Read / Write / Construct Only
88 </pre>
89 </div>
90 <div class="refsect1">
91 <a name="GUnixSocketAddress.description"></a><h2>Description</h2>
92 <p>
93 Support for UNIX-domain (also known as local) sockets.
94 </p>
95 <p>
96 UNIX domain sockets are generally visible in the filesystem.
97 However, some systems support abstract socket names which are not
98 visible in the filesystem and not affected by the filesystem
99 permissions, visibility, etc. Currently this is only supported
100 under Linux. If you attempt to use abstract sockets on other
101 systems, function calls may return <a class="link" href="gio-GIOError.html#G-IO-ERROR-NOT-SUPPORTED:CAPS"><code class="literal">G_IO_ERROR_NOT_SUPPORTED</code></a>
102 errors. You can use <a class="link" href="GUnixSocketAddress.html#g-unix-socket-address-abstract-names-supported" title="g_unix_socket_address_abstract_names_supported ()"><code class="function">g_unix_socket_address_abstract_names_supported()</code></a>
103 to see if abstract names are supported.
104 </p>
105 <p>
106 Note that <code class="filename">&lt;gio/gunixsocketaddress.h&gt;</code> belongs to
107 the UNIX-specific GIO interfaces, thus you have to use the
108 <code class="filename">gio-unix-2.0.pc</code> pkg-config file when using it.
109 </p>
110 </div>
111 <div class="refsect1">
112 <a name="GUnixSocketAddress.details"></a><h2>Details</h2>
113 <div class="refsect2">
114 <a name="GUnixSocketAddress-struct"></a><h3>struct GUnixSocketAddress</h3>
115 <pre class="programlisting">struct GUnixSocketAddress;</pre>
116 <p>
117 A UNIX-domain (local) socket address, corresponding to a
118 <span class="type">struct sockaddr_un</span>.
119 </p>
120 </div>
121 <hr>
122 <div class="refsect2">
123 <a name="GUnixSocketAddressType"></a><h3>enum GUnixSocketAddressType</h3>
124 <pre class="programlisting">typedef enum {
125   G_UNIX_SOCKET_ADDRESS_INVALID,
126   G_UNIX_SOCKET_ADDRESS_ANONYMOUS,
127   G_UNIX_SOCKET_ADDRESS_PATH,
128   G_UNIX_SOCKET_ADDRESS_ABSTRACT,
129   G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED
130 } GUnixSocketAddressType;
131 </pre>
132 <p>
133 The type of name used by a <a class="link" href="GUnixSocketAddress.html" title="GUnixSocketAddress"><span class="type">GUnixSocketAddress</span></a>.
134 <a class="link" href="GUnixSocketAddress.html#G-UNIX-SOCKET-ADDRESS-PATH:CAPS"><code class="literal">G_UNIX_SOCKET_ADDRESS_PATH</code></a> indicates a traditional unix domain
135 socket bound to a filesystem path. <a class="link" href="GUnixSocketAddress.html#G-UNIX-SOCKET-ADDRESS-ANONYMOUS:CAPS"><code class="literal">G_UNIX_SOCKET_ADDRESS_ANONYMOUS</code></a>
136 indicates a socket not bound to any name (eg, a client-side socket,
137 or a socket created with <code class="function">socketpair()</code>).
138 </p>
139 <p>
140 For abstract sockets, there are two incompatible ways of naming
141 them; the man pages suggest using the entire <code class="literal">struct
142 sockaddr_un</code> as the name, padding the unused parts of the
143 <code class="literal">sun_path</code> field with zeroes; this corresponds to
144 <a class="link" href="GUnixSocketAddress.html#G-UNIX-SOCKET-ADDRESS-ABSTRACT-PADDED:CAPS"><code class="literal">G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED</code></a>. However, many programs
145 instead just use a portion of <code class="literal">sun_path</code>, and pass an appropriate
146 smaller length to <code class="function">bind()</code> or <code class="function">connect()</code>. This is
147 <a class="link" href="GUnixSocketAddress.html#G-UNIX-SOCKET-ADDRESS-ABSTRACT:CAPS"><code class="literal">G_UNIX_SOCKET_ADDRESS_ABSTRACT</code></a>.
148 </p>
149 <div class="variablelist"><table border="0">
150 <col align="left" valign="top">
151 <tbody>
152 <tr>
153 <td><p><a name="G-UNIX-SOCKET-ADDRESS-INVALID:CAPS"></a><span class="term"><code class="literal">G_UNIX_SOCKET_ADDRESS_INVALID</code></span></p></td>
154 <td>invalid
155 </td>
156 </tr>
157 <tr>
158 <td><p><a name="G-UNIX-SOCKET-ADDRESS-ANONYMOUS:CAPS"></a><span class="term"><code class="literal">G_UNIX_SOCKET_ADDRESS_ANONYMOUS</code></span></p></td>
159 <td>anonymous
160 </td>
161 </tr>
162 <tr>
163 <td><p><a name="G-UNIX-SOCKET-ADDRESS-PATH:CAPS"></a><span class="term"><code class="literal">G_UNIX_SOCKET_ADDRESS_PATH</code></span></p></td>
164 <td>a filesystem path
165 </td>
166 </tr>
167 <tr>
168 <td><p><a name="G-UNIX-SOCKET-ADDRESS-ABSTRACT:CAPS"></a><span class="term"><code class="literal">G_UNIX_SOCKET_ADDRESS_ABSTRACT</code></span></p></td>
169 <td>an abstract name
170 </td>
171 </tr>
172 <tr>
173 <td><p><a name="G-UNIX-SOCKET-ADDRESS-ABSTRACT-PADDED:CAPS"></a><span class="term"><code class="literal">G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED</code></span></p></td>
174 <td>an abstract name, 0-padded
175   to the full length of a unix socket name
176 </td>
177 </tr>
178 </tbody>
179 </table></div>
180 <p class="since">Since 2.26</p>
181 </div>
182 <hr>
183 <div class="refsect2">
184 <a name="g-unix-socket-address-new"></a><h3>g_unix_socket_address_new ()</h3>
185 <pre class="programlisting"><a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="returnvalue">GSocketAddress</span></a> *    g_unix_socket_address_new           (<em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *path</code></em>);</pre>
186 <p>
187 Creates a new <a class="link" href="GUnixSocketAddress.html" title="GUnixSocketAddress"><span class="type">GUnixSocketAddress</span></a> for <em class="parameter"><code>path</code></em>.
188 </p>
189 <p>
190 To create abstract socket addresses, on systems that support that,
191 use <a class="link" href="GUnixSocketAddress.html#g-unix-socket-address-new-abstract" title="g_unix_socket_address_new_abstract ()"><code class="function">g_unix_socket_address_new_abstract()</code></a>.
192 </p>
193 <div class="variablelist"><table border="0">
194 <col align="left" valign="top">
195 <tbody>
196 <tr>
197 <td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
198 <td>the socket path</td>
199 </tr>
200 <tr>
201 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
202 <td>a new <a class="link" href="GUnixSocketAddress.html" title="GUnixSocketAddress"><span class="type">GUnixSocketAddress</span></a>
203 </td>
204 </tr>
205 </tbody>
206 </table></div>
207 <p class="since">Since 2.22</p>
208 </div>
209 <hr>
210 <div class="refsect2">
211 <a name="g-unix-socket-address-new-abstract"></a><h3>g_unix_socket_address_new_abstract ()</h3>
212 <pre class="programlisting"><a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="returnvalue">GSocketAddress</span></a> *    g_unix_socket_address_new_abstract  (<em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *path</code></em>,
213                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> path_len</code></em>);</pre>
214 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
215 <h3 class="title">Warning</h3>
216 <p><code class="literal">g_unix_socket_address_new_abstract</code> is deprecated and should not be used in newly-written code. Use <a class="link" href="GUnixSocketAddress.html#g-unix-socket-address-new-with-type" title="g_unix_socket_address_new_with_type ()"><code class="function">g_unix_socket_address_new_with_type()</code></a>.</p>
217 </div>
218 <p>
219 Creates a new <a class="link" href="GUnixSocketAddress.html#G-UNIX-SOCKET-ADDRESS-ABSTRACT-PADDED:CAPS"><code class="literal">G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED</code></a>
220 <a class="link" href="GUnixSocketAddress.html" title="GUnixSocketAddress"><span class="type">GUnixSocketAddress</span></a> for <em class="parameter"><code>path</code></em>.
221 </p>
222 <div class="variablelist"><table border="0">
223 <col align="left" valign="top">
224 <tbody>
225 <tr>
226 <td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
227 <td>the abstract name. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=path_len][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> gchar]</span>
228 </td>
229 </tr>
230 <tr>
231 <td><p><span class="term"><em class="parameter"><code>path_len</code></em> :</span></p></td>
232 <td>the length of <em class="parameter"><code>path</code></em>, or -1</td>
233 </tr>
234 <tr>
235 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
236 <td>a new <a class="link" href="GUnixSocketAddress.html" title="GUnixSocketAddress"><span class="type">GUnixSocketAddress</span></a>
237 </td>
238 </tr>
239 </tbody>
240 </table></div>
241 </div>
242 <hr>
243 <div class="refsect2">
244 <a name="g-unix-socket-address-new-with-type"></a><h3>g_unix_socket_address_new_with_type ()</h3>
245 <pre class="programlisting"><a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="returnvalue">GSocketAddress</span></a> *    g_unix_socket_address_new_with_type (<em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *path</code></em>,
246                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> path_len</code></em>,
247                                                          <em class="parameter"><code><a class="link" href="GUnixSocketAddress.html#GUnixSocketAddressType" title="enum GUnixSocketAddressType"><span class="type">GUnixSocketAddressType</span></a> type</code></em>);</pre>
248 <p>
249 Creates a new <a class="link" href="GUnixSocketAddress.html" title="GUnixSocketAddress"><span class="type">GUnixSocketAddress</span></a> of type <em class="parameter"><code>type</code></em> with name <em class="parameter"><code>path</code></em>.
250 </p>
251 <p>
252 If <em class="parameter"><code>type</code></em> is <a class="link" href="GUnixSocketAddress.html#G-UNIX-SOCKET-ADDRESS-PATH:CAPS"><code class="literal">G_UNIX_SOCKET_ADDRESS_PATH</code></a>, this is equivalent to
253 calling <a class="link" href="GUnixSocketAddress.html#g-unix-socket-address-new" title="g_unix_socket_address_new ()"><code class="function">g_unix_socket_address_new()</code></a>.
254 </p>
255 <p>
256 If <em class="parameter"><code>path_type</code></em> is <a class="link" href="GUnixSocketAddress.html#G-UNIX-SOCKET-ADDRESS-ABSTRACT:CAPS"><code class="literal">G_UNIX_SOCKET_ADDRESS_ABSTRACT</code></a>, then <em class="parameter"><code>path_len</code></em>
257 bytes of <em class="parameter"><code>path</code></em> will be copied to the socket's path, and only those
258 bytes will be considered part of the name. (If <em class="parameter"><code>path_len</code></em> is -1,
259 then <em class="parameter"><code>path</code></em> is assumed to be NUL-terminated.) For example, if <em class="parameter"><code>path</code></em>
260 was "test", then calling <a class="link" href="GSocketAddress.html#g-socket-address-get-native-size" title="g_socket_address_get_native_size ()"><code class="function">g_socket_address_get_native_size()</code></a> on the
261 returned socket would return 7 (2 bytes of overhead, 1 byte for the
262 abstract-socket indicator byte, and 4 bytes for the name "test").
263 </p>
264 <p>
265 If <em class="parameter"><code>path_type</code></em> is <a class="link" href="GUnixSocketAddress.html#G-UNIX-SOCKET-ADDRESS-ABSTRACT-PADDED:CAPS"><code class="literal">G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED</code></a>, then
266 <em class="parameter"><code>path_len</code></em> bytes of <em class="parameter"><code>path</code></em> will be copied to the socket's path, the
267 rest of the path will be padded with 0 bytes, and the entire
268 zero-padded buffer will be considered the name. (As above, if
269 <em class="parameter"><code>path_len</code></em> is -1, then <em class="parameter"><code>path</code></em> is assumed to be NUL-terminated.) In
270 this case, <a class="link" href="GSocketAddress.html#g-socket-address-get-native-size" title="g_socket_address_get_native_size ()"><code class="function">g_socket_address_get_native_size()</code></a> will always return
271 the full size of a <code class="literal">struct sockaddr_un</code>, although
272 <a class="link" href="GUnixSocketAddress.html#g-unix-socket-address-get-path-len" title="g_unix_socket_address_get_path_len ()"><code class="function">g_unix_socket_address_get_path_len()</code></a> will still return just the
273 length of <em class="parameter"><code>path</code></em>.
274 </p>
275 <p>
276 <a class="link" href="GUnixSocketAddress.html#G-UNIX-SOCKET-ADDRESS-ABSTRACT:CAPS"><code class="literal">G_UNIX_SOCKET_ADDRESS_ABSTRACT</code></a> is preferred over
277 <a class="link" href="GUnixSocketAddress.html#G-UNIX-SOCKET-ADDRESS-ABSTRACT-PADDED:CAPS"><code class="literal">G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED</code></a> for new programs. Of course,
278 when connecting to a server created by another process, you must
279 use the appropriate type corresponding to how that process created
280 its listening socket.
281 </p>
282 <div class="variablelist"><table border="0">
283 <col align="left" valign="top">
284 <tbody>
285 <tr>
286 <td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
287 <td>the name. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=path_len][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> gchar]</span>
288 </td>
289 </tr>
290 <tr>
291 <td><p><span class="term"><em class="parameter"><code>path_len</code></em> :</span></p></td>
292 <td>the length of <em class="parameter"><code>path</code></em>, or -1</td>
293 </tr>
294 <tr>
295 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
296 <td>a <a class="link" href="GUnixSocketAddress.html#GUnixSocketAddressType" title="enum GUnixSocketAddressType"><span class="type">GUnixSocketAddressType</span></a>
297 </td>
298 </tr>
299 <tr>
300 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
301 <td>a new <a class="link" href="GUnixSocketAddress.html" title="GUnixSocketAddress"><span class="type">GUnixSocketAddress</span></a>
302 </td>
303 </tr>
304 </tbody>
305 </table></div>
306 <p class="since">Since 2.26</p>
307 </div>
308 <hr>
309 <div class="refsect2">
310 <a name="g-unix-socket-address-get-is-abstract"></a><h3>g_unix_socket_address_get_is_abstract ()</h3>
311 <pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            g_unix_socket_address_get_is_abstract
312                                                         (<em class="parameter"><code><a class="link" href="GUnixSocketAddress.html" title="GUnixSocketAddress"><span class="type">GUnixSocketAddress</span></a> *address</code></em>);</pre>
313 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
314 <h3 class="title">Warning</h3>
315 <p><code class="literal">g_unix_socket_address_get_is_abstract</code> is deprecated and should not be used in newly-written code. Use <a class="link" href="GUnixSocketAddress.html#g-unix-socket-address-get-address-type" title="g_unix_socket_address_get_address_type ()"><code class="function">g_unix_socket_address_get_address_type()</code></a></p>
316 </div>
317 <p>
318 Tests if <em class="parameter"><code>address</code></em> is abstract.
319 </p>
320 <div class="variablelist"><table border="0">
321 <col align="left" valign="top">
322 <tbody>
323 <tr>
324 <td><p><span class="term"><em class="parameter"><code>address</code></em> :</span></p></td>
325 <td>a <a class="link" href="GInetSocketAddress.html" title="GInetSocketAddress"><span class="type">GInetSocketAddress</span></a>
326 </td>
327 </tr>
328 <tr>
329 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
330 <td>
331 <a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the address is abstract, <a href="./../glib/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</td>
332 </tr>
333 </tbody>
334 </table></div>
335 <p class="since">Since 2.22</p>
336 </div>
337 <hr>
338 <div class="refsect2">
339 <a name="g-unix-socket-address-get-address-type"></a><h3>g_unix_socket_address_get_address_type ()</h3>
340 <pre class="programlisting"><a class="link" href="GUnixSocketAddress.html#GUnixSocketAddressType" title="enum GUnixSocketAddressType"><span class="returnvalue">GUnixSocketAddressType</span></a> g_unix_socket_address_get_address_type
341                                                         (<em class="parameter"><code><a class="link" href="GUnixSocketAddress.html" title="GUnixSocketAddress"><span class="type">GUnixSocketAddress</span></a> *address</code></em>);</pre>
342 <p>
343 Gets <em class="parameter"><code>address</code></em>'s type.
344 </p>
345 <div class="variablelist"><table border="0">
346 <col align="left" valign="top">
347 <tbody>
348 <tr>
349 <td><p><span class="term"><em class="parameter"><code>address</code></em> :</span></p></td>
350 <td>a <a class="link" href="GInetSocketAddress.html" title="GInetSocketAddress"><span class="type">GInetSocketAddress</span></a>
351 </td>
352 </tr>
353 <tr>
354 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
355 <td>a <a class="link" href="GUnixSocketAddress.html#GUnixSocketAddressType" title="enum GUnixSocketAddressType"><span class="type">GUnixSocketAddressType</span></a>
356 </td>
357 </tr>
358 </tbody>
359 </table></div>
360 <p class="since">Since 2.26</p>
361 </div>
362 <hr>
363 <div class="refsect2">
364 <a name="g-unix-socket-address-get-path"></a><h3>g_unix_socket_address_get_path ()</h3>
365 <pre class="programlisting">const <span class="returnvalue">char</span> *        g_unix_socket_address_get_path      (<em class="parameter"><code><a class="link" href="GUnixSocketAddress.html" title="GUnixSocketAddress"><span class="type">GUnixSocketAddress</span></a> *address</code></em>);</pre>
366 <p>
367 Gets <em class="parameter"><code>address</code></em>'s path, or for abstract sockets the "name".
368 </p>
369 <p>
370 Guaranteed to be zero-terminated, but an abstract socket
371 may contain embedded zeros, and thus you should use
372 <a class="link" href="GUnixSocketAddress.html#g-unix-socket-address-get-path-len" title="g_unix_socket_address_get_path_len ()"><code class="function">g_unix_socket_address_get_path_len()</code></a> to get the true length
373 of this string.
374 </p>
375 <div class="variablelist"><table border="0">
376 <col align="left" valign="top">
377 <tbody>
378 <tr>
379 <td><p><span class="term"><em class="parameter"><code>address</code></em> :</span></p></td>
380 <td>a <a class="link" href="GInetSocketAddress.html" title="GInetSocketAddress"><span class="type">GInetSocketAddress</span></a>
381 </td>
382 </tr>
383 <tr>
384 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
385 <td>the path for <em class="parameter"><code>address</code></em>
386 </td>
387 </tr>
388 </tbody>
389 </table></div>
390 <p class="since">Since 2.22</p>
391 </div>
392 <hr>
393 <div class="refsect2">
394 <a name="g-unix-socket-address-get-path-len"></a><h3>g_unix_socket_address_get_path_len ()</h3>
395 <pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gsize"><span class="returnvalue">gsize</span></a>               g_unix_socket_address_get_path_len  (<em class="parameter"><code><a class="link" href="GUnixSocketAddress.html" title="GUnixSocketAddress"><span class="type">GUnixSocketAddress</span></a> *address</code></em>);</pre>
396 <p>
397 Gets the length of <em class="parameter"><code>address</code></em>'s path.
398 </p>
399 <p>
400 For details, see <a class="link" href="GUnixSocketAddress.html#g-unix-socket-address-get-path" title="g_unix_socket_address_get_path ()"><code class="function">g_unix_socket_address_get_path()</code></a>.
401 </p>
402 <div class="variablelist"><table border="0">
403 <col align="left" valign="top">
404 <tbody>
405 <tr>
406 <td><p><span class="term"><em class="parameter"><code>address</code></em> :</span></p></td>
407 <td>a <a class="link" href="GInetSocketAddress.html" title="GInetSocketAddress"><span class="type">GInetSocketAddress</span></a>
408 </td>
409 </tr>
410 <tr>
411 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
412 <td>the length of the path</td>
413 </tr>
414 </tbody>
415 </table></div>
416 <p class="since">Since 2.22</p>
417 </div>
418 <hr>
419 <div class="refsect2">
420 <a name="g-unix-socket-address-abstract-names-supported"></a><h3>g_unix_socket_address_abstract_names_supported ()</h3>
421 <pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            g_unix_socket_address_abstract_names_supported
422                                                         (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
423 <p>
424 Checks if abstract unix domain socket names are supported.
425 </p>
426 <div class="variablelist"><table border="0">
427 <col align="left" valign="top">
428 <tbody><tr>
429 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
430 <td>
431 <a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if supported, <a href="./../glib/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</td>
432 </tr></tbody>
433 </table></div>
434 <p class="since">Since 2.22</p>
435 </div>
436 </div>
437 <div class="refsect1">
438 <a name="GUnixSocketAddress.property-details"></a><h2>Property Details</h2>
439 <div class="refsect2">
440 <a name="GUnixSocketAddress--abstract"></a><h3>The <code class="literal">"abstract"</code> property</h3>
441 <pre class="programlisting">  "abstract"                 <a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write / Construct Only</pre>
442 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
443 <h3 class="title">Warning</h3>
444 <p><code class="literal">GUnixSocketAddress:abstract</code> is deprecated and should not be used in newly-written code. Use <a class="link" href="GUnixSocketAddress.html#GUnixSocketAddress--address-type" title='The "address-type" property'><span class="type">"address-type"</span></a>, which
445 distinguishes between zero-padded and non-zero-padded
446 abstract addresses.</p>
447 </div>
448 <p>
449 Whether or not this is an abstract address
450 </p>
451 <p>Default value: FALSE</p>
452 </div>
453 <hr>
454 <div class="refsect2">
455 <a name="GUnixSocketAddress--address-type"></a><h3>The <code class="literal">"address-type"</code> property</h3>
456 <pre class="programlisting">  "address-type"             <a class="link" href="GUnixSocketAddress.html#GUnixSocketAddressType" title="enum GUnixSocketAddressType"><span class="type">GUnixSocketAddressType</span></a>  : Read / Write / Construct Only</pre>
457 <p>The type of UNIX socket address.</p>
458 <p>Default value: G_UNIX_SOCKET_ADDRESS_PATH</p>
459 </div>
460 <hr>
461 <div class="refsect2">
462 <a name="GUnixSocketAddress--path"></a><h3>The <code class="literal">"path"</code> property</h3>
463 <pre class="programlisting">  "path"                     <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct Only</pre>
464 <p>UNIX socket path.</p>
465 <p>Default value: NULL</p>
466 </div>
467 <hr>
468 <div class="refsect2">
469 <a name="GUnixSocketAddress--path-as-array"></a><h3>The <code class="literal">"path-as-array"</code> property</h3>
470 <pre class="programlisting">  "path-as-array"            <a href="./../glib/glib/glib-Byte-Arrays.html#GByteArray"><span class="type">GByteArray</span></a>*           : Read / Write / Construct Only</pre>
471 <p>UNIX socket path, as byte array.</p>
472 </div>
473 </div>
474 </div>
475 <div class="footer">
476 <hr>
477           Generated by GTK-Doc V1.18</div>
478 </body>
479 </html>