~ubuntu-branches/ubuntu/vivid/glib2.0/vivid-proposed

« back to all changes in this revision

Viewing changes to docs/reference/gio/html/GSocket.html

  • Committer: Package Import Robot
  • Author(s): Andreas Henriksson
  • Date: 2014-03-24 20:58:34 UTC
  • mfrom: (1.66.13)
  • Revision ID: package-import@ubuntu.com-20140324205834-8hsgok8k36ftocqa
Tags: 2.40.0-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
<tbody>
45
45
<tr>
46
46
<td class="function_type">
47
 
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
47
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
48
48
</td>
49
49
<td class="function_name">
50
50
<span class="c_punctuation">(</span><a class="link" href="GSocket.html#GSocketSourceFunc" title="GSocketSourceFunc ()">*GSocketSourceFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
68
68
</tr>
69
69
<tr>
70
70
<td class="function_type">
71
 
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
71
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
72
72
</td>
73
73
<td class="function_name">
74
74
<a class="link" href="GSocket.html#g-socket-bind" title="g_socket_bind ()">g_socket_bind</a> <span class="c_punctuation">()</span>
76
76
</tr>
77
77
<tr>
78
78
<td class="function_type">
79
 
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
79
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
80
80
</td>
81
81
<td class="function_name">
82
82
<a class="link" href="GSocket.html#g-socket-listen" title="g_socket_listen ()">g_socket_listen</a> <span class="c_punctuation">()</span>
92
92
</tr>
93
93
<tr>
94
94
<td class="function_type">
95
 
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
95
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
96
96
</td>
97
97
<td class="function_name">
98
98
<a class="link" href="GSocket.html#g-socket-connect" title="g_socket_connect ()">g_socket_connect</a> <span class="c_punctuation">()</span>
100
100
</tr>
101
101
<tr>
102
102
<td class="function_type">
103
 
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
103
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
104
104
</td>
105
105
<td class="function_name">
106
106
<a class="link" href="GSocket.html#g-socket-check-connect-result" title="g_socket_check_connect_result ()">g_socket_check_connect_result</a> <span class="c_punctuation">()</span>
108
108
</tr>
109
109
<tr>
110
110
<td class="function_type">
111
 
<a href="../glib/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>
 
111
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>
112
112
</td>
113
113
<td class="function_name">
114
114
<a class="link" href="GSocket.html#g-socket-receive" title="g_socket_receive ()">g_socket_receive</a> <span class="c_punctuation">()</span>
116
116
</tr>
117
117
<tr>
118
118
<td class="function_type">
119
 
<a href="../glib/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>
 
119
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>
120
120
</td>
121
121
<td class="function_name">
122
122
<a class="link" href="GSocket.html#g-socket-receive-from" title="g_socket_receive_from ()">g_socket_receive_from</a> <span class="c_punctuation">()</span>
124
124
</tr>
125
125
<tr>
126
126
<td class="function_type">
127
 
<a href="../glib/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>
 
127
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>
128
128
</td>
129
129
<td class="function_name">
130
130
<a class="link" href="GSocket.html#g-socket-receive-message" title="g_socket_receive_message ()">g_socket_receive_message</a> <span class="c_punctuation">()</span>
132
132
</tr>
133
133
<tr>
134
134
<td class="function_type">
135
 
<a href="../glib/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>
 
135
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>
136
136
</td>
137
137
<td class="function_name">
138
138
<a class="link" href="GSocket.html#g-socket-receive-with-blocking" title="g_socket_receive_with_blocking ()">g_socket_receive_with_blocking</a> <span class="c_punctuation">()</span>
140
140
</tr>
141
141
<tr>
142
142
<td class="function_type">
143
 
<a href="../glib/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>
 
143
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>
144
144
</td>
145
145
<td class="function_name">
146
146
<a class="link" href="GSocket.html#g-socket-send" title="g_socket_send ()">g_socket_send</a> <span class="c_punctuation">()</span>
148
148
</tr>
149
149
<tr>
150
150
<td class="function_type">
151
 
<a href="../glib/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>
 
151
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>
152
152
</td>
153
153
<td class="function_name">
154
154
<a class="link" href="GSocket.html#g-socket-send-to" title="g_socket_send_to ()">g_socket_send_to</a> <span class="c_punctuation">()</span>
156
156
</tr>
157
157
<tr>
158
158
<td class="function_type">
159
 
<a href="../glib/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>
 
159
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>
160
160
</td>
161
161
<td class="function_name">
162
162
<a class="link" href="GSocket.html#g-socket-send-message" title="g_socket_send_message ()">g_socket_send_message</a> <span class="c_punctuation">()</span>
164
164
</tr>
165
165
<tr>
166
166
<td class="function_type">
167
 
<a href="../glib/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>
 
167
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>
168
168
</td>
169
169
<td class="function_name">
170
170
<a class="link" href="GSocket.html#g-socket-send-with-blocking" title="g_socket_send_with_blocking ()">g_socket_send_with_blocking</a> <span class="c_punctuation">()</span>
172
172
</tr>
173
173
<tr>
174
174
<td class="function_type">
175
 
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
175
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
176
176
</td>
177
177
<td class="function_name">
178
178
<a class="link" href="GSocket.html#g-socket-close" title="g_socket_close ()">g_socket_close</a> <span class="c_punctuation">()</span>
180
180
</tr>
181
181
<tr>
182
182
<td class="function_type">
183
 
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
183
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
184
184
</td>
185
185
<td class="function_name">
186
186
<a class="link" href="GSocket.html#g-socket-is-closed" title="g_socket_is_closed ()">g_socket_is_closed</a> <span class="c_punctuation">()</span>
188
188
</tr>
189
189
<tr>
190
190
<td class="function_type">
191
 
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
191
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
192
192
</td>
193
193
<td class="function_name">
194
194
<a class="link" href="GSocket.html#g-socket-shutdown" title="g_socket_shutdown ()">g_socket_shutdown</a> <span class="c_punctuation">()</span>
196
196
</tr>
197
197
<tr>
198
198
<td class="function_type">
199
 
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
199
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
200
200
</td>
201
201
<td class="function_name">
202
202
<a class="link" href="GSocket.html#g-socket-is-connected" title="g_socket_is_connected ()">g_socket_is_connected</a> <span class="c_punctuation">()</span>
204
204
</tr>
205
205
<tr>
206
206
<td class="function_type">
207
 
<a href="../glib/glib-The-Main-Event-Loop.html#GSource"><span class="returnvalue">GSource</span></a> *
 
207
<a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GSource"><span class="returnvalue">GSource</span></a> *
208
208
</td>
209
209
<td class="function_name">
210
210
<a class="link" href="GSocket.html#g-socket-create-source" title="g_socket_create_source ()">g_socket_create_source</a> <span class="c_punctuation">()</span>
212
212
</tr>
213
213
<tr>
214
214
<td class="function_type">
215
 
<a href="../glib/glib-IO-Channels.html#GIOCondition"><span class="returnvalue">GIOCondition</span></a>
 
215
<a href="http://library.gnome.org/devel/glib/unstable/glib-IO-Channels.html#GIOCondition"><span class="returnvalue">GIOCondition</span></a>
216
216
</td>
217
217
<td class="function_name">
218
218
<a class="link" href="GSocket.html#g-socket-condition-check" title="g_socket_condition_check ()">g_socket_condition_check</a> <span class="c_punctuation">()</span>
220
220
</tr>
221
221
<tr>
222
222
<td class="function_type">
223
 
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
223
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
224
224
</td>
225
225
<td class="function_name">
226
226
<a class="link" href="GSocket.html#g-socket-condition-wait" title="g_socket_condition_wait ()">g_socket_condition_wait</a> <span class="c_punctuation">()</span>
228
228
</tr>
229
229
<tr>
230
230
<td class="function_type">
231
 
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
231
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
232
232
</td>
233
233
<td class="function_name">
234
234
<a class="link" href="GSocket.html#g-socket-condition-timed-wait" title="g_socket_condition_timed_wait ()">g_socket_condition_timed_wait</a> <span class="c_punctuation">()</span>
236
236
</tr>
237
237
<tr>
238
238
<td class="function_type">
239
 
<a href="../glib/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>
 
239
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>
240
240
</td>
241
241
<td class="function_name">
242
242
<a class="link" href="GSocket.html#g-socket-get-available-bytes" title="g_socket_get_available_bytes ()">g_socket_get_available_bytes</a> <span class="c_punctuation">()</span>
252
252
</tr>
253
253
<tr>
254
254
<td class="function_type">
255
 
<a href="../glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
 
255
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
256
256
</td>
257
257
<td class="function_name">
258
258
<a class="link" href="GSocket.html#g-socket-get-listen-backlog" title="g_socket_get_listen_backlog ()">g_socket_get_listen_backlog</a> <span class="c_punctuation">()</span>
260
260
</tr>
261
261
<tr>
262
262
<td class="function_type">
263
 
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
263
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
264
264
</td>
265
265
<td class="function_name">
266
266
<a class="link" href="GSocket.html#g-socket-get-blocking" title="g_socket_get_blocking ()">g_socket_get_blocking</a> <span class="c_punctuation">()</span>
276
276
</tr>
277
277
<tr>
278
278
<td class="function_type">
279
 
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
279
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
280
280
</td>
281
281
<td class="function_name">
282
282
<a class="link" href="GSocket.html#g-socket-get-keepalive" title="g_socket_get_keepalive ()">g_socket_get_keepalive</a> <span class="c_punctuation">()</span>
292
292
</tr>
293
293
<tr>
294
294
<td class="function_type">
295
 
<a href="../glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
 
295
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
296
296
</td>
297
297
<td class="function_name">
298
298
<a class="link" href="GSocket.html#g-socket-get-timeout" title="g_socket_get_timeout ()">g_socket_get_timeout</a> <span class="c_punctuation">()</span>
316
316
</tr>
317
317
<tr>
318
318
<td class="function_type">
319
 
<a href="../glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
 
319
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
320
320
</td>
321
321
<td class="function_name">
322
322
<a class="link" href="GSocket.html#g-socket-get-ttl" title="g_socket_get_ttl ()">g_socket_get_ttl</a> <span class="c_punctuation">()</span>
324
324
</tr>
325
325
<tr>
326
326
<td class="function_type">
327
 
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
327
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
328
328
</td>
329
329
<td class="function_name">
330
330
<a class="link" href="GSocket.html#g-socket-get-broadcast" title="g_socket_get_broadcast ()">g_socket_get_broadcast</a> <span class="c_punctuation">()</span>
340
340
</tr>
341
341
<tr>
342
342
<td class="function_type">
343
 
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
343
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
344
344
</td>
345
345
<td class="function_name">
346
346
<a class="link" href="GSocket.html#g-socket-get-option" title="g_socket_get_option ()">g_socket_get_option</a> <span class="c_punctuation">()</span>
348
348
</tr>
349
349
<tr>
350
350
<td class="function_type">
351
 
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
351
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
352
352
</td>
353
353
<td class="function_name">
354
354
<a class="link" href="GSocket.html#g-socket-set-option" title="g_socket_set_option ()">g_socket_set_option</a> <span class="c_punctuation">()</span>
404
404
</tr>
405
405
<tr>
406
406
<td class="function_type">
407
 
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
407
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
408
408
</td>
409
409
<td class="function_name">
410
410
<a class="link" href="GSocket.html#g-socket-speaks-ipv4" title="g_socket_speaks_ipv4 ()">g_socket_speaks_ipv4</a> <span class="c_punctuation">()</span>
420
420
</tr>
421
421
<tr>
422
422
<td class="function_type">
423
 
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
423
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
424
424
</td>
425
425
<td class="function_name">
426
426
<a class="link" href="GSocket.html#g-socket-join-multicast-group" title="g_socket_join_multicast_group ()">g_socket_join_multicast_group</a> <span class="c_punctuation">()</span>
428
428
</tr>
429
429
<tr>
430
430
<td class="function_type">
431
 
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
431
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
432
432
</td>
433
433
<td class="function_name">
434
434
<a class="link" href="GSocket.html#g-socket-leave-multicast-group" title="g_socket_leave_multicast_group ()">g_socket_leave_multicast_group</a> <span class="c_punctuation">()</span>
436
436
</tr>
437
437
<tr>
438
438
<td class="function_type">
439
 
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
439
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
440
440
</td>
441
441
<td class="function_name">
442
442
<a class="link" href="GSocket.html#g-socket-get-multicast-loopback" title="g_socket_get_multicast_loopback ()">g_socket_get_multicast_loopback</a> <span class="c_punctuation">()</span>
452
452
</tr>
453
453
<tr>
454
454
<td class="function_type">
455
 
<a href="../glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
 
455
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
456
456
</td>
457
457
<td class="function_name">
458
458
<a class="link" href="GSocket.html#g-socket-get-multicast-ttl" title="g_socket_get_multicast_ttl ()">g_socket_get_multicast_ttl</a> <span class="c_punctuation">()</span>
479
479
</colgroup>
480
480
<tbody>
481
481
<tr>
482
 
<td class="property_type"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
 
482
<td class="property_type"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
483
483
<td class="property_name"><a class="link" href="GSocket.html#GSocket--blocking" title="The “blocking” property">blocking</a></td>
484
484
<td class="property_flags">Read / Write</td>
485
485
</tr>
486
486
<tr>
487
 
<td class="property_type"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
 
487
<td class="property_type"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
488
488
<td class="property_name"><a class="link" href="GSocket.html#GSocket--broadcast" title="The “broadcast” property">broadcast</a></td>
489
489
<td class="property_flags">Read / Write</td>
490
490
</tr>
494
494
<td class="property_flags">Read / Write / Construct Only</td>
495
495
</tr>
496
496
<tr>
497
 
<td class="property_type"><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
 
497
<td class="property_type"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
498
498
<td class="property_name"><a class="link" href="GSocket.html#GSocket--fd" title="The “fd” property">fd</a></td>
499
499
<td class="property_flags">Read / Write / Construct Only</td>
500
500
</tr>
501
501
<tr>
502
 
<td class="property_type"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
 
502
<td class="property_type"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
503
503
<td class="property_name"><a class="link" href="GSocket.html#GSocket--keepalive" title="The “keepalive” property">keepalive</a></td>
504
504
<td class="property_flags">Read / Write</td>
505
505
</tr>
506
506
<tr>
507
 
<td class="property_type"><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
 
507
<td class="property_type"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
508
508
<td class="property_name"><a class="link" href="GSocket.html#GSocket--listen-backlog" title="The “listen-backlog” property">listen-backlog</a></td>
509
509
<td class="property_flags">Read / Write</td>
510
510
</tr>
515
515
<td class="property_flags">Read</td>
516
516
</tr>
517
517
<tr>
518
 
<td class="property_type"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
 
518
<td class="property_type"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
519
519
<td class="property_name"><a class="link" href="GSocket.html#GSocket--multicast-loopback" title="The “multicast-loopback” property">multicast-loopback</a></td>
520
520
<td class="property_flags">Read / Write</td>
521
521
</tr>
522
522
<tr>
523
 
<td class="property_type"><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
 
523
<td class="property_type"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
524
524
<td class="property_name"><a class="link" href="GSocket.html#GSocket--multicast-ttl" title="The “multicast-ttl” property">multicast-ttl</a></td>
525
525
<td class="property_flags">Read / Write</td>
526
526
</tr>
536
536
<td class="property_flags">Read</td>
537
537
</tr>
538
538
<tr>
539
 
<td class="property_type"><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
 
539
<td class="property_type"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
540
540
<td class="property_name"><a class="link" href="GSocket.html#GSocket--timeout" title="The “timeout” property">timeout</a></td>
541
541
<td class="property_flags">Read / Write</td>
542
542
</tr>
543
543
<tr>
544
 
<td class="property_type"><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
 
544
<td class="property_type"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
545
545
<td class="property_name"><a class="link" href="GSocket.html#GSocket--ttl" title="The “ttl” property">ttl</a></td>
546
546
<td class="property_flags">Read / Write</td>
547
547
</tr>
590
590
</div>
591
591
<div class="refsect1">
592
592
<a name="GSocket.object-hierarchy"></a><h2>Object Hierarchy</h2>
593
 
<pre class="screen">    <a href="../gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a>
 
593
<pre class="screen">    <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
594
594
    <span class="lineart">╰──</span> GSocket
595
595
</pre>
596
596
</div>
616
616
<a class="link" href="GSocketService.html" title="GSocketService"><span class="type">GSocketService</span></a> and <a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="type">GSocketConnection</span></a>. However there may be cases where
617
617
direct use of <a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> is useful.</p>
618
618
<p><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> implements the <a class="link" href="GInitable.html" title="GInitable"><span class="type">GInitable</span></a> interface, so if it is manually constructed
619
 
by e.g. <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-new"><code class="function">g_object_new()</code></a> you must call <a class="link" href="GInitable.html#g-initable-init" title="g_initable_init ()"><code class="function">g_initable_init()</code></a> and check the
 
619
by e.g. <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-new"><code class="function">g_object_new()</code></a> you must call <a class="link" href="GInitable.html#g-initable-init" title="g_initable_init ()"><code class="function">g_initable_init()</code></a> and check the
620
620
results before using the object. This is done automatically in
621
621
<a class="link" href="GSocket.html#g-socket-new" title="g_socket_new ()"><code class="function">g_socket_new()</code></a> and <a class="link" href="GSocket.html#g-socket-new-from-fd" title="g_socket_new_from_fd ()"><code class="function">g_socket_new_from_fd()</code></a>, so these functions can return
622
 
<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
 
622
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
623
623
<p>Sockets operate in two general modes, blocking or non-blocking. When
624
624
in blocking mode all operations block until the requested operation
625
625
is finished or there is an error. In non-blocking mode all calls that
626
626
would block return immediately with a <a class="link" href="gio-GIOError.html#G-IO-ERROR-WOULD-BLOCK:CAPS"><code class="literal">G_IO_ERROR_WOULD_BLOCK</code></a> error.
627
627
To know when a call would successfully run you can call <a class="link" href="GSocket.html#g-socket-condition-check" title="g_socket_condition_check ()"><code class="function">g_socket_condition_check()</code></a>,
628
628
or <a class="link" href="GSocket.html#g-socket-condition-wait" title="g_socket_condition_wait ()"><code class="function">g_socket_condition_wait()</code></a>. You can also use <a class="link" href="GSocket.html#g-socket-create-source" title="g_socket_create_source ()"><code class="function">g_socket_create_source()</code></a> and
629
 
attach it to a <a href="../glib/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a> to get callbacks when I/O is possible.
 
629
attach it to a <a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a> to get callbacks when I/O is possible.
630
630
Note that all sockets are always set to non blocking mode in the system, and
631
631
blocking mode is emulated in GSocket.</p>
632
632
<p>When working in non-blocking mode applications should always be able to
651
651
<a name="GSocket.functions_details"></a><h2>Functions</h2>
652
652
<div class="refsect2">
653
653
<a name="GSocketSourceFunc"></a><h3>GSocketSourceFunc ()</h3>
654
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
654
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
655
655
<span class="c_punctuation">(</span>*GSocketSourceFunc<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>,
656
 
                      <em class="parameter"><code><a href="../glib/glib-IO-Channels.html#GIOCondition"><span class="type">GIOCondition</span></a> condition</code></em>,
657
 
                      <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
658
 
<p>This is the function type of the callback used for the <a href="../glib/glib-The-Main-Event-Loop.html#GSource"><span class="type">GSource</span></a>
 
656
                      <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-IO-Channels.html#GIOCondition"><span class="type">GIOCondition</span></a> condition</code></em>,
 
657
                      <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
 
658
<p>This is the function type of the callback used for the <a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GSource"><span class="type">GSource</span></a>
659
659
returned by <a class="link" href="GSocket.html#g-socket-create-source" title="g_socket_create_source ()"><code class="function">g_socket_create_source()</code></a>.</p>
660
660
<div class="refsect3">
661
661
<a name="id-1.4.13.2.10.2.5"></a><h4>Parameters</h4>
686
686
</div>
687
687
<div class="refsect3">
688
688
<a name="id-1.4.13.2.10.2.6"></a><h4>Returns</h4>
689
 
<p> it should return <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the source should be removed.</p>
 
689
<p> it should return <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the source should be removed.</p>
690
690
<p></p>
691
691
</div>
692
692
<p class="since">Since 2.22</p>
698
698
g_socket_new (<em class="parameter"><code><a class="link" href="GSocketAddress.html#GSocketFamily" title="enum GSocketFamily"><span class="type">GSocketFamily</span></a> family</code></em>,
699
699
              <em class="parameter"><code><a class="link" href="GSocket.html#GSocketType" title="enum GSocketType"><span class="type">GSocketType</span></a> type</code></em>,
700
700
              <em class="parameter"><code><a class="link" href="GSocket.html#GSocketProtocol" title="enum GSocketProtocol"><span class="type">GSocketProtocol</span></a> protocol</code></em>,
701
 
              <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
701
              <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
702
702
<p>Creates a new <a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> with the defined family, type and protocol.
703
703
If <em class="parameter"><code>protocol</code></em>
704
704
 is 0 (<a class="link" href="GSocket.html#G-SOCKET-PROTOCOL-DEFAULT:CAPS"><code class="literal">G_SOCKET_PROTOCOL_DEFAULT</code></a>) the default protocol type
738
738
</tr>
739
739
<tr>
740
740
<td class="parameter_name"><p>error</p></td>
741
 
<td class="parameter_description"><p><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
 
741
<td class="parameter_description"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
742
742
<td class="parameter_annotations"> </td>
743
743
</tr>
744
744
</tbody>
746
746
</div>
747
747
<div class="refsect3">
748
748
<a name="id-1.4.13.2.10.3.8"></a><h4>Returns</h4>
749
 
<p> a <a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
750
 
Free the returned object with <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.</p>
 
749
<p> a <a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
 
750
Free the returned object with <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.</p>
751
751
<p></p>
752
752
</div>
753
753
<p class="since">Since 2.22</p>
756
756
<div class="refsect2">
757
757
<a name="g-socket-new-from-fd"></a><h3>g_socket_new_from_fd ()</h3>
758
758
<pre class="programlisting"><a class="link" href="GSocket.html" title="GSocket"><span class="returnvalue">GSocket</span></a> *
759
 
g_socket_new_from_fd (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> fd</code></em>,
760
 
                      <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
759
g_socket_new_from_fd (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> fd</code></em>,
 
760
                      <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
761
761
<p>Creates a new <a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> from a native file descriptor
762
762
or winsock SOCKET handle.</p>
763
763
<p>This reads all the settings from the file descriptor so that
780
780
</tr>
781
781
<tr>
782
782
<td class="parameter_name"><p>error</p></td>
783
 
<td class="parameter_description"><p><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
 
783
<td class="parameter_description"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
784
784
<td class="parameter_annotations"> </td>
785
785
</tr>
786
786
</tbody>
788
788
</div>
789
789
<div class="refsect3">
790
790
<a name="id-1.4.13.2.10.4.7"></a><h4>Returns</h4>
791
 
<p> a <a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
792
 
Free the returned object with <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.</p>
 
791
<p> a <a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
 
792
Free the returned object with <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.</p>
793
793
<p></p>
794
794
</div>
795
795
<p class="since">Since 2.22</p>
797
797
<hr>
798
798
<div class="refsect2">
799
799
<a name="g-socket-bind"></a><h3>g_socket_bind ()</h3>
800
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
800
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
801
801
g_socket_bind (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>,
802
802
               <em class="parameter"><code><a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="type">GSocketAddress</span></a> *address</code></em>,
803
 
               <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> allow_reuse</code></em>,
804
 
               <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
803
               <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> allow_reuse</code></em>,
 
804
               <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
805
805
<p>When a socket is created it is attached to an address family, but it
806
806
doesn't have an address in this family. <a class="link" href="GSocket.html#g-socket-bind" title="g_socket_bind ()"><code class="function">g_socket_bind()</code></a> assigns the
807
807
address (sometimes called name) of the socket.</p>
812
812
<p>If <em class="parameter"><code>socket</code></em>
813
813
 is a TCP socket, then <em class="parameter"><code>allow_reuse</code></em>
814
814
 controls the setting
815
 
of the <code class="literal">SO_REUSEADDR</code> socket option; normally it should be <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> for
 
815
of the <code class="literal">SO_REUSEADDR</code> socket option; normally it should be <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> for
816
816
server sockets (sockets that you will eventually call
817
 
<a class="link" href="GSocket.html#g-socket-accept" title="g_socket_accept ()"><code class="function">g_socket_accept()</code></a> on), and <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> for client sockets. (Failing to
 
817
<a class="link" href="GSocket.html#g-socket-accept" title="g_socket_accept ()"><code class="function">g_socket_accept()</code></a> on), and <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> for client sockets. (Failing to
818
818
set this flag on a server socket may cause <a class="link" href="GSocket.html#g-socket-bind" title="g_socket_bind ()"><code class="function">g_socket_bind()</code></a> to return
819
819
<a class="link" href="gio-GIOError.html#G-IO-ERROR-ADDRESS-IN-USE:CAPS"><code class="literal">G_IO_ERROR_ADDRESS_IN_USE</code></a> if the server program is stopped and then
820
820
immediately restarted.)</p>
852
852
</tr>
853
853
<tr>
854
854
<td class="parameter_name"><p>error</p></td>
855
 
<td class="parameter_description"><p><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
 
855
<td class="parameter_description"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
856
856
<td class="parameter_annotations"> </td>
857
857
</tr>
858
858
</tbody>
860
860
</div>
861
861
<div class="refsect3">
862
862
<a name="id-1.4.13.2.10.5.9"></a><h4>Returns</h4>
863
 
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on error.</p>
 
863
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on error.</p>
864
864
<p></p>
865
865
</div>
866
866
<p class="since">Since 2.22</p>
868
868
<hr>
869
869
<div class="refsect2">
870
870
<a name="g-socket-listen"></a><h3>g_socket_listen ()</h3>
871
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
871
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
872
872
g_socket_listen (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>,
873
 
                 <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
873
                 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
874
874
<p>Marks the socket as a server socket, i.e. a socket that is used
875
875
to accept incoming requests using <a class="link" href="GSocket.html#g-socket-accept" title="g_socket_accept ()"><code class="function">g_socket_accept()</code></a>.</p>
876
876
<p>Before calling this the socket must be bound to a local address using
893
893
</tr>
894
894
<tr>
895
895
<td class="parameter_name"><p>error</p></td>
896
 
<td class="parameter_description"><p><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
 
896
<td class="parameter_description"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
897
897
<td class="parameter_annotations"> </td>
898
898
</tr>
899
899
</tbody>
901
901
</div>
902
902
<div class="refsect3">
903
903
<a name="id-1.4.13.2.10.6.8"></a><h4>Returns</h4>
904
 
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on error.</p>
 
904
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on error.</p>
905
905
<p></p>
906
906
</div>
907
907
<p class="since">Since 2.22</p>
912
912
<pre class="programlisting"><a class="link" href="GSocket.html" title="GSocket"><span class="returnvalue">GSocket</span></a> *
913
913
g_socket_accept (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>,
914
914
                 <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
915
 
                 <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
915
                 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
916
916
<p>Accept incoming connections on a connection-based socket. This removes
917
917
the first outstanding connection request from the listening socket and
918
918
creates a <a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> object for it.</p>
921
921
must be listening for incoming connections (<a class="link" href="GSocket.html#g-socket-listen" title="g_socket_listen ()"><code class="function">g_socket_listen()</code></a>).</p>
922
922
<p>If there are no outstanding connections then the operation will block
923
923
or return <a class="link" href="gio-GIOError.html#G-IO-ERROR-WOULD-BLOCK:CAPS"><code class="literal">G_IO_ERROR_WOULD_BLOCK</code></a> if non-blocking I/O is enabled.
924
 
To be notified of an incoming connection, wait for the <code class="literal">G_IO_IN</code> condition.</p>
 
924
To be notified of an incoming connection, wait for the <a href="http://library.gnome.org/devel/glib/unstable/glib-IO-Channels.html#G-IO-IN:CAPS"><code class="literal">G_IO_IN</code></a> condition.</p>
925
925
<div class="refsect3">
926
926
<a name="id-1.4.13.2.10.7.7"></a><h4>Parameters</h4>
927
927
<div class="informaltable"><table width="100%" border="0">
938
938
</tr>
939
939
<tr>
940
940
<td class="parameter_name"><p>cancellable</p></td>
941
 
<td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><code class="literal">GCancellable</code></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
 
941
<td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><code class="literal">GCancellable</code></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
942
942
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
943
943
</tr>
944
944
<tr>
945
945
<td class="parameter_name"><p>error</p></td>
946
 
<td class="parameter_description"><p><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
 
946
<td class="parameter_description"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
947
947
<td class="parameter_annotations"> </td>
948
948
</tr>
949
949
</tbody>
951
951
</div>
952
952
<div class="refsect3">
953
953
<a name="id-1.4.13.2.10.7.8"></a><h4>Returns</h4>
954
 
<p> a new <a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
955
 
Free the returned object with <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
 
954
<p> a new <a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
 
955
Free the returned object with <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
956
956
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
957
957
</div>
958
958
<p class="since">Since 2.22</p>
960
960
<hr>
961
961
<div class="refsect2">
962
962
<a name="g-socket-connect"></a><h3>g_socket_connect ()</h3>
963
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
963
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
964
964
g_socket_connect (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>,
965
965
                  <em class="parameter"><code><a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="type">GSocketAddress</span></a> *address</code></em>,
966
966
                  <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
967
 
                  <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
967
                  <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
968
968
<p>Connect the socket to the specified remote address.</p>
969
969
<p>For connection oriented socket this generally means we attempt to make
970
970
a connection to the <em class="parameter"><code>address</code></em>
1000
1000
</tr>
1001
1001
<tr>
1002
1002
<td class="parameter_name"><p>cancellable</p></td>
1003
 
<td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><code class="literal">GCancellable</code></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
 
1003
<td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><code class="literal">GCancellable</code></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
1004
1004
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1005
1005
</tr>
1006
1006
<tr>
1007
1007
<td class="parameter_name"><p>error</p></td>
1008
 
<td class="parameter_description"><p><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
 
1008
<td class="parameter_description"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
1009
1009
<td class="parameter_annotations"> </td>
1010
1010
</tr>
1011
1011
</tbody>
1013
1013
</div>
1014
1014
<div class="refsect3">
1015
1015
<a name="id-1.4.13.2.10.8.9"></a><h4>Returns</h4>
1016
 
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if connected, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on error.</p>
 
1016
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if connected, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on error.</p>
1017
1017
<p></p>
1018
1018
</div>
1019
1019
<p class="since">Since 2.22</p>
1021
1021
<hr>
1022
1022
<div class="refsect2">
1023
1023
<a name="g-socket-check-connect-result"></a><h3>g_socket_check_connect_result ()</h3>
1024
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
1024
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
1025
1025
g_socket_check_connect_result (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>,
1026
 
                               <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
1026
                               <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
1027
1027
<p>Checks and resets the pending connect error for the socket.
1028
1028
This is used to check for errors when <a class="link" href="GSocket.html#g-socket-connect" title="g_socket_connect ()"><code class="function">g_socket_connect()</code></a> is
1029
1029
used in non-blocking mode.</p>
1043
1043
</tr>
1044
1044
<tr>
1045
1045
<td class="parameter_name"><p>error</p></td>
1046
 
<td class="parameter_description"><p><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
 
1046
<td class="parameter_description"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
1047
1047
<td class="parameter_annotations"> </td>
1048
1048
</tr>
1049
1049
</tbody>
1051
1051
</div>
1052
1052
<div class="refsect3">
1053
1053
<a name="id-1.4.13.2.10.9.6"></a><h4>Returns</h4>
1054
 
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if no error, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise, setting <em class="parameter"><code>error</code></em>
 
1054
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if no error, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise, setting <em class="parameter"><code>error</code></em>
1055
1055
to the error</p>
1056
1056
<p></p>
1057
1057
</div>
1060
1060
<hr>
1061
1061
<div class="refsect2">
1062
1062
<a name="g-socket-receive"></a><h3>g_socket_receive ()</h3>
1063
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>
 
1063
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>
1064
1064
g_socket_receive (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>,
1065
 
                  <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *buffer</code></em>,
1066
 
                  <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>,
 
1065
                  <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *buffer</code></em>,
 
1066
                  <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>,
1067
1067
                  <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
1068
 
                  <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
1068
                  <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
1069
1069
<p>Receive data (up to <em class="parameter"><code>size</code></em>
1070
1070
 bytes) from a socket. This is mainly used by
1071
1071
connection-oriented sockets; it is identical to <a class="link" href="GSocket.html#g-socket-receive-from" title="g_socket_receive_from ()"><code class="function">g_socket_receive_from()</code></a>
1072
1072
with <em class="parameter"><code>address</code></em>
1073
 
 set to <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
 
1073
 set to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
1074
1074
<p>For <a class="link" href="GSocket.html#G-SOCKET-TYPE-DATAGRAM:CAPS"><code class="literal">G_SOCKET_TYPE_DATAGRAM</code></a> and <a class="link" href="GSocket.html#G-SOCKET-TYPE-SEQPACKET:CAPS"><code class="literal">G_SOCKET_TYPE_SEQPACKET</code></a> sockets,
1075
1075
<a class="link" href="GSocket.html#g-socket-receive" title="g_socket_receive ()"><code class="function">g_socket_receive()</code></a> will always read either 0 or 1 complete messages from
1076
1076
the socket. If the received message is too large to fit in <em class="parameter"><code>buffer</code></em>
1089
1089
error. If there is no data available and the socket is in
1090
1090
non-blocking mode, a <a class="link" href="gio-GIOError.html#G-IO-ERROR-WOULD-BLOCK:CAPS"><code class="literal">G_IO_ERROR_WOULD_BLOCK</code></a> error will be
1091
1091
returned. To be notified when data is available, wait for the
1092
 
<code class="literal">G_IO_IN</code> condition.</p>
 
1092
<a href="http://library.gnome.org/devel/glib/unstable/glib-IO-Channels.html#G-IO-IN:CAPS"><code class="literal">G_IO_IN</code></a> condition.</p>
1093
1093
<p>On error -1 is returned and <em class="parameter"><code>error</code></em>
1094
1094
 is set accordingly.</p>
1095
1095
<div class="refsect3">
1120
1120
</tr>
1121
1121
<tr>
1122
1122
<td class="parameter_name"><p>cancellable</p></td>
1123
 
<td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><code class="literal">GCancellable</code></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
 
1123
<td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><code class="literal">GCancellable</code></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
1124
1124
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1125
1125
</tr>
1126
1126
<tr>
1127
1127
<td class="parameter_name"><p>error</p></td>
1128
 
<td class="parameter_description"><p><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
 
1128
<td class="parameter_description"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
1129
1129
<td class="parameter_annotations"> </td>
1130
1130
</tr>
1131
1131
</tbody>
1142
1142
<hr>
1143
1143
<div class="refsect2">
1144
1144
<a name="g-socket-receive-from"></a><h3>g_socket_receive_from ()</h3>
1145
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>
 
1145
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>
1146
1146
g_socket_receive_from (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>,
1147
1147
                       <em class="parameter"><code><a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="type">GSocketAddress</span></a> **address</code></em>,
1148
 
                       <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *buffer</code></em>,
1149
 
                       <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>,
 
1148
                       <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *buffer</code></em>,
 
1149
                       <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>,
1150
1150
                       <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
1151
 
                       <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
1151
                       <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
1152
1152
<p>Receive data (up to <em class="parameter"><code>size</code></em>
1153
1153
 bytes) from a socket.</p>
1154
1154
<p>If <em class="parameter"><code>address</code></em>
1155
 
 is non-<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> then <em class="parameter"><code>address</code></em>
 
1155
 is non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> then <em class="parameter"><code>address</code></em>
1156
1156
 will be set equal to the
1157
1157
source address of the received packet.
1158
1158
<em class="parameter"><code>address</code></em>
1175
1175
<tr>
1176
1176
<td class="parameter_name"><p>address</p></td>
1177
1177
<td class="parameter_description"><p> a pointer to a <a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="type">GSocketAddress</span></a>
1178
 
pointer, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
 
1178
pointer, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
1179
1179
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1180
1180
</tr>
1181
1181
<tr>
1192
1192
</tr>
1193
1193
<tr>
1194
1194
<td class="parameter_name"><p>cancellable</p></td>
1195
 
<td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><code class="literal">GCancellable</code></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
 
1195
<td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><code class="literal">GCancellable</code></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
1196
1196
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1197
1197
</tr>
1198
1198
<tr>
1199
1199
<td class="parameter_name"><p>error</p></td>
1200
 
<td class="parameter_description"><p><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
 
1200
<td class="parameter_description"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
1201
1201
<td class="parameter_annotations"> </td>
1202
1202
</tr>
1203
1203
</tbody>
1214
1214
<hr>
1215
1215
<div class="refsect2">
1216
1216
<a name="g-socket-receive-message"></a><h3>g_socket_receive_message ()</h3>
1217
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>
 
1217
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>
1218
1218
g_socket_receive_message (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>,
1219
1219
                          <em class="parameter"><code><a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="type">GSocketAddress</span></a> **address</code></em>,
1220
1220
                          <em class="parameter"><code><a class="link" href="GSocket.html#GInputVector" title="struct GInputVector"><span class="type">GInputVector</span></a> *vectors</code></em>,
1221
 
                          <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> num_vectors</code></em>,
 
1221
                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> num_vectors</code></em>,
1222
1222
                          <em class="parameter"><code><a class="link" href="GSocketControlMessage.html" title="GSocketControlMessage"><span class="type">GSocketControlMessage</span></a> ***messages</code></em>,
1223
 
                          <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *num_messages</code></em>,
1224
 
                          <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *flags</code></em>,
 
1223
                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *num_messages</code></em>,
 
1224
                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *flags</code></em>,
1225
1225
                          <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
1226
 
                          <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
1226
                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
1227
1227
<p>Receive data from a socket.  This is the most complicated and
1228
1228
fully-featured version of this call. For easier use, see
1229
1229
<a class="link" href="GSocket.html#g-socket-receive" title="g_socket_receive ()"><code class="function">g_socket_receive()</code></a> and <a class="link" href="GSocket.html#g-socket-receive-from" title="g_socket_receive_from ()"><code class="function">g_socket_receive_from()</code></a>.</p>
1230
1230
<p>If <em class="parameter"><code>address</code></em>
1231
 
 is non-<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> then <em class="parameter"><code>address</code></em>
 
1231
 is non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> then <em class="parameter"><code>address</code></em>
1232
1232
 will be set equal to the
1233
1233
source address of the received packet.
1234
1234
<em class="parameter"><code>address</code></em>
1241
1241
If <em class="parameter"><code>num_vectors</code></em>
1242
1242
 is -1, then <em class="parameter"><code>vectors</code></em>
1243
1243
 is assumed to be terminated
1244
 
by a <a class="link" href="GSocket.html#GInputVector" title="struct GInputVector"><span class="type">GInputVector</span></a> with a <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> buffer pointer.</p>
 
1244
by a <a class="link" href="GSocket.html#GInputVector" title="struct GInputVector"><span class="type">GInputVector</span></a> with a <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> buffer pointer.</p>
1245
1245
<p>As a special case, if <em class="parameter"><code>num_vectors</code></em>
1246
1246
 is 0 (in which case, <em class="parameter"><code>vectors</code></em>
1247
1247
 
1248
 
may of course be <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>), then a single byte is received and
 
1248
may of course be <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>), then a single byte is received and
1249
1249
discarded. This is to facilitate the common practice of sending a
1250
1250
single '\0' byte for the purposes of transferring ancillary data.</p>
1251
1251
<p><em class="parameter"><code>messages</code></em>
1252
 
, if non-<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, will be set to point to a newly-allocated
1253
 
array of <a class="link" href="GSocketControlMessage.html" title="GSocketControlMessage"><span class="type">GSocketControlMessage</span></a> instances or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no such
 
1252
, if non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, will be set to point to a newly-allocated
 
1253
array of <a class="link" href="GSocketControlMessage.html" title="GSocketControlMessage"><span class="type">GSocketControlMessage</span></a> instances or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no such
1254
1254
messages was received. These correspond to the control messages
1255
1255
received from the kernel, one <a class="link" href="GSocketControlMessage.html" title="GSocketControlMessage"><span class="type">GSocketControlMessage</span></a> per message
1256
 
from the kernel. This array is <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated and must be freed
1257
 
by the caller using <a href="../glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> after calling <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a> on each
 
1256
from the kernel. This array is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated and must be freed
 
1257
by the caller using <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> after calling <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a> on each
1258
1258
element. If <em class="parameter"><code>messages</code></em>
1259
 
 is <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, any control messages received will
 
1259
 is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, any control messages received will
1260
1260
be discarded.</p>
1261
1261
<p><em class="parameter"><code>num_messages</code></em>
1262
 
, if non-<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, will be set to the number of control
 
1262
, if non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, will be set to the number of control
1263
1263
messages received.</p>
1264
1264
<p>If both <em class="parameter"><code>messages</code></em>
1265
1265
 and <em class="parameter"><code>num_messages</code></em>
1266
 
 are non-<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then
 
1266
 are non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then
1267
1267
<em class="parameter"><code>num_messages</code></em>
1268
1268
 gives the number of <a class="link" href="GSocketControlMessage.html" title="GSocketControlMessage"><span class="type">GSocketControlMessage</span></a> instances
1269
1269
in <em class="parameter"><code>messages</code></em>
1270
 
 (ie: not including the <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> terminator).</p>
 
1270
 (ie: not including the <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> terminator).</p>
1271
1271
<p><em class="parameter"><code>flags</code></em>
1272
1272
 is an in/out parameter. The commonly available arguments
1273
1273
for this are available in the <a class="link" href="GSocket.html#GSocketMsgFlags" title="enum GSocketMsgFlags"><span class="type">GSocketMsgFlags</span></a> enum, but the
1288
1288
error. If there is no data available and the socket is in
1289
1289
non-blocking mode, a <a class="link" href="gio-GIOError.html#G-IO-ERROR-WOULD-BLOCK:CAPS"><code class="literal">G_IO_ERROR_WOULD_BLOCK</code></a> error will be
1290
1290
returned. To be notified when data is available, wait for the
1291
 
<code class="literal">G_IO_IN</code> condition.</p>
 
1291
<a href="http://library.gnome.org/devel/glib/unstable/glib-IO-Channels.html#G-IO-IN:CAPS"><code class="literal">G_IO_IN</code></a> condition.</p>
1292
1292
<p>On error -1 is returned and <em class="parameter"><code>error</code></em>
1293
1293
 is set accordingly.</p>
1294
1294
<div class="refsect3">
1308
1308
<tr>
1309
1309
<td class="parameter_name"><p>address</p></td>
1310
1310
<td class="parameter_description"><p> a pointer to a <a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="type">GSocketAddress</span></a>
1311
 
pointer, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
 
1311
pointer, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
1312
1312
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1313
1313
</tr>
1314
1314
<tr>
1325
1325
<tr>
1326
1326
<td class="parameter_name"><p>messages</p></td>
1327
1327
<td class="parameter_description"><p> a pointer which
1328
 
may be filled with an array of <a href="GSocketControlMessage.html"><span class="type">GSocketControlMessages</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
 
1328
may be filled with an array of <a href="GSocketControlMessage.html"><span class="type">GSocketControlMessages</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
1329
1329
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=num_messages][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1330
1330
</tr>
1331
1331
<tr>
1332
1332
<td class="parameter_name"><p>num_messages</p></td>
1333
1333
<td class="parameter_description"><p>a pointer which will be filled with the number of
1334
1334
elements in <em class="parameter"><code>messages</code></em>
1335
 
, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
 
1335
, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
1336
1336
<td class="parameter_annotations"> </td>
1337
1337
</tr>
1338
1338
<tr>
1342
1342
</tr>
1343
1343
<tr>
1344
1344
<td class="parameter_name"><p>cancellable</p></td>
1345
 
<td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><code class="literal">GCancellable</code></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
 
1345
<td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><code class="literal">GCancellable</code></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
1346
1346
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1347
1347
</tr>
1348
1348
<tr>
1349
1349
<td class="parameter_name"><p>error</p></td>
1350
 
<td class="parameter_description"><p>a <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> pointer, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
 
1350
<td class="parameter_description"><p>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> pointer, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
1351
1351
<td class="parameter_annotations"> </td>
1352
1352
</tr>
1353
1353
</tbody>
1364
1364
<hr>
1365
1365
<div class="refsect2">
1366
1366
<a name="g-socket-receive-with-blocking"></a><h3>g_socket_receive_with_blocking ()</h3>
1367
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>
 
1367
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>
1368
1368
g_socket_receive_with_blocking (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>,
1369
 
                                <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *buffer</code></em>,
1370
 
                                <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>,
1371
 
                                <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> blocking</code></em>,
 
1369
                                <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *buffer</code></em>,
 
1370
                                <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>,
 
1371
                                <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> blocking</code></em>,
1372
1372
                                <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
1373
 
                                <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
1373
                                <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
1374
1374
<p>This behaves exactly the same as <a class="link" href="GSocket.html#g-socket-receive" title="g_socket_receive ()"><code class="function">g_socket_receive()</code></a>, except that
1375
1375
the choice of blocking or non-blocking behavior is determined by
1376
1376
the <em class="parameter"><code>blocking</code></em>
1409
1409
</tr>
1410
1410
<tr>
1411
1411
<td class="parameter_name"><p>cancellable</p></td>
1412
 
<td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><code class="literal">GCancellable</code></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
 
1412
<td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><code class="literal">GCancellable</code></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
1413
1413
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1414
1414
</tr>
1415
1415
<tr>
1416
1416
<td class="parameter_name"><p>error</p></td>
1417
 
<td class="parameter_description"><p><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
 
1417
<td class="parameter_description"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
1418
1418
<td class="parameter_annotations"> </td>
1419
1419
</tr>
1420
1420
</tbody>
1431
1431
<hr>
1432
1432
<div class="refsect2">
1433
1433
<a name="g-socket-send"></a><h3>g_socket_send ()</h3>
1434
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>
 
1434
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>
1435
1435
g_socket_send (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>,
1436
 
               <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *buffer</code></em>,
1437
 
               <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>,
 
1436
               <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *buffer</code></em>,
 
1437
               <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>,
1438
1438
               <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
1439
 
               <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
1439
               <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
1440
1440
<p>Tries to send <em class="parameter"><code>size</code></em>
1441
1441
 bytes from <em class="parameter"><code>buffer</code></em>
1442
1442
 on the socket. This is
1443
1443
mainly used by connection-oriented sockets; it is identical to
1444
1444
<a class="link" href="GSocket.html#g-socket-send-to" title="g_socket_send_to ()"><code class="function">g_socket_send_to()</code></a> with <em class="parameter"><code>address</code></em>
1445
 
 set to <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
 
1445
 set to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
1446
1446
<p>If the socket is in blocking mode the call will block until there is
1447
1447
space for the data in the socket queue. If there is no space available
1448
1448
and the socket is in non-blocking mode a <a class="link" href="gio-GIOError.html#G-IO-ERROR-WOULD-BLOCK:CAPS"><code class="literal">G_IO_ERROR_WOULD_BLOCK</code></a> error
1449
1449
will be returned. To be notified when space is available, wait for the
1450
 
<code class="literal">G_IO_OUT</code> condition. Note though that you may still receive
 
1450
<a href="http://library.gnome.org/devel/glib/unstable/glib-IO-Channels.html#G-IO-OUT:CAPS"><code class="literal">G_IO_OUT</code></a> condition. Note though that you may still receive
1451
1451
<a class="link" href="gio-GIOError.html#G-IO-ERROR-WOULD-BLOCK:CAPS"><code class="literal">G_IO_ERROR_WOULD_BLOCK</code></a> from <a class="link" href="GSocket.html#g-socket-send" title="g_socket_send ()"><code class="function">g_socket_send()</code></a> even if you were previously
1452
 
notified of a <code class="literal">G_IO_OUT</code> condition. (On Windows in particular, this is
 
1452
notified of a <a href="http://library.gnome.org/devel/glib/unstable/glib-IO-Channels.html#G-IO-OUT:CAPS"><code class="literal">G_IO_OUT</code></a> condition. (On Windows in particular, this is
1453
1453
very common due to the way the underlying APIs work.)</p>
1454
1454
<p>On error -1 is returned and <em class="parameter"><code>error</code></em>
1455
1455
 is set accordingly.</p>
1480
1480
</tr>
1481
1481
<tr>
1482
1482
<td class="parameter_name"><p>cancellable</p></td>
1483
 
<td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><code class="literal">GCancellable</code></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
 
1483
<td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><code class="literal">GCancellable</code></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
1484
1484
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1485
1485
</tr>
1486
1486
<tr>
1487
1487
<td class="parameter_name"><p>error</p></td>
1488
 
<td class="parameter_description"><p><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
 
1488
<td class="parameter_description"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
1489
1489
<td class="parameter_annotations"> </td>
1490
1490
</tr>
1491
1491
</tbody>
1503
1503
<hr>
1504
1504
<div class="refsect2">
1505
1505
<a name="g-socket-send-to"></a><h3>g_socket_send_to ()</h3>
1506
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>
 
1506
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>
1507
1507
g_socket_send_to (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>,
1508
1508
                  <em class="parameter"><code><a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="type">GSocketAddress</span></a> *address</code></em>,
1509
 
                  <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *buffer</code></em>,
1510
 
                  <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>,
 
1509
                  <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *buffer</code></em>,
 
1510
                  <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>,
1511
1511
                  <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
1512
 
                  <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
1512
                  <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
1513
1513
<p>Tries to send <em class="parameter"><code>size</code></em>
1514
1514
 bytes from <em class="parameter"><code>buffer</code></em>
1515
1515
 to <em class="parameter"><code>address</code></em>
1516
1516
. If <em class="parameter"><code>address</code></em>
1517
1517
 is
1518
 
<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> then the message is sent to the default receiver (set by
 
1518
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> then the message is sent to the default receiver (set by
1519
1519
<a class="link" href="GSocket.html#g-socket-connect" title="g_socket_connect ()"><code class="function">g_socket_connect()</code></a>).</p>
1520
1520
<p>See <a class="link" href="GSocket.html#g-socket-send" title="g_socket_send ()"><code class="function">g_socket_send()</code></a> for additional information.</p>
1521
1521
<div class="refsect3">
1534
1534
</tr>
1535
1535
<tr>
1536
1536
<td class="parameter_name"><p>address</p></td>
1537
 
<td class="parameter_description"><p> a <a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="type">GSocketAddress</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
 
1537
<td class="parameter_description"><p> a <a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="type">GSocketAddress</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
1538
1538
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1539
1539
</tr>
1540
1540
<tr>
1550
1550
</tr>
1551
1551
<tr>
1552
1552
<td class="parameter_name"><p>cancellable</p></td>
1553
 
<td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><code class="literal">GCancellable</code></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
 
1553
<td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><code class="literal">GCancellable</code></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
1554
1554
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1555
1555
</tr>
1556
1556
<tr>
1557
1557
<td class="parameter_name"><p>error</p></td>
1558
 
<td class="parameter_description"><p><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
 
1558
<td class="parameter_description"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
1559
1559
<td class="parameter_annotations"> </td>
1560
1560
</tr>
1561
1561
</tbody>
1573
1573
<hr>
1574
1574
<div class="refsect2">
1575
1575
<a name="g-socket-send-message"></a><h3>g_socket_send_message ()</h3>
1576
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>
 
1576
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>
1577
1577
g_socket_send_message (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>,
1578
1578
                       <em class="parameter"><code><a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="type">GSocketAddress</span></a> *address</code></em>,
1579
1579
                       <em class="parameter"><code><a class="link" href="GSocket.html#GOutputVector" title="struct GOutputVector"><span class="type">GOutputVector</span></a> *vectors</code></em>,
1580
 
                       <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> num_vectors</code></em>,
 
1580
                       <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> num_vectors</code></em>,
1581
1581
                       <em class="parameter"><code><a class="link" href="GSocketControlMessage.html" title="GSocketControlMessage"><span class="type">GSocketControlMessage</span></a> **messages</code></em>,
1582
 
                       <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> num_messages</code></em>,
1583
 
                       <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> flags</code></em>,
 
1582
                       <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> num_messages</code></em>,
 
1583
                       <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> flags</code></em>,
1584
1584
                       <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
1585
 
                       <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
1585
                       <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
1586
1586
<p>Send data to <em class="parameter"><code>address</code></em>
1587
1587
 on <em class="parameter"><code>socket</code></em>
1588
1588
.  This is the most complicated and
1589
1589
fully-featured version of this call. For easier use, see
1590
1590
<a class="link" href="GSocket.html#g-socket-send" title="g_socket_send ()"><code class="function">g_socket_send()</code></a> and <a class="link" href="GSocket.html#g-socket-send-to" title="g_socket_send_to ()"><code class="function">g_socket_send_to()</code></a>.</p>
1591
1591
<p>If <em class="parameter"><code>address</code></em>
1592
 
 is <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> then the message is sent to the default receiver
 
1592
 is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> then the message is sent to the default receiver
1593
1593
(set by <a class="link" href="GSocket.html#g-socket-connect" title="g_socket_connect ()"><code class="function">g_socket_connect()</code></a>).</p>
1594
1594
<p><em class="parameter"><code>vectors</code></em>
1595
1595
 must point to an array of <a class="link" href="GSocket.html#GOutputVector" title="struct GOutputVector"><span class="type">GOutputVector</span></a> structs and
1598
1598
 is -1,
1599
1599
then <em class="parameter"><code>vectors</code></em>
1600
1600
 is assumed to be terminated by a <a class="link" href="GSocket.html#GOutputVector" title="struct GOutputVector"><span class="type">GOutputVector</span></a> with a
1601
 
<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> buffer pointer.) The <a class="link" href="GSocket.html#GOutputVector" title="struct GOutputVector"><span class="type">GOutputVector</span></a> structs describe the buffers
 
1601
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> buffer pointer.) The <a class="link" href="GSocket.html#GOutputVector" title="struct GOutputVector"><span class="type">GOutputVector</span></a> structs describe the buffers
1602
1602
that the sent data will be gathered from. Using multiple
1603
1603
<a href="GSocket.html#GOutputVector"><span class="type">GOutputVectors</span></a> is more memory-efficient than manually copying
1604
1604
data from multiple sources into a single buffer, and more
1605
1605
network-efficient than making multiple calls to <a class="link" href="GSocket.html#g-socket-send" title="g_socket_send ()"><code class="function">g_socket_send()</code></a>.</p>
1606
1606
<p><em class="parameter"><code>messages</code></em>
1607
 
, if non-<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, is taken to point to an array of <em class="parameter"><code>num_messages</code></em>
 
1607
, if non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, is taken to point to an array of <em class="parameter"><code>num_messages</code></em>
1608
1608
 
1609
1609
<a class="link" href="GSocketControlMessage.html" title="GSocketControlMessage"><span class="type">GSocketControlMessage</span></a> instances. These correspond to the control
1610
1610
messages to be sent on the socket.
1611
1611
If <em class="parameter"><code>num_messages</code></em>
1612
1612
 is -1 then <em class="parameter"><code>messages</code></em>
1613
 
 is treated as a <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated
 
1613
 is treated as a <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated
1614
1614
array.</p>
1615
1615
<p><em class="parameter"><code>flags</code></em>
1616
1616
 modify how the message is sent. The commonly available arguments
1621
1621
space for the data in the socket queue. If there is no space available
1622
1622
and the socket is in non-blocking mode a <a class="link" href="gio-GIOError.html#G-IO-ERROR-WOULD-BLOCK:CAPS"><code class="literal">G_IO_ERROR_WOULD_BLOCK</code></a> error
1623
1623
will be returned. To be notified when space is available, wait for the
1624
 
<code class="literal">G_IO_OUT</code> condition. Note though that you may still receive
 
1624
<a href="http://library.gnome.org/devel/glib/unstable/glib-IO-Channels.html#G-IO-OUT:CAPS"><code class="literal">G_IO_OUT</code></a> condition. Note though that you may still receive
1625
1625
<a class="link" href="gio-GIOError.html#G-IO-ERROR-WOULD-BLOCK:CAPS"><code class="literal">G_IO_ERROR_WOULD_BLOCK</code></a> from <a class="link" href="GSocket.html#g-socket-send" title="g_socket_send ()"><code class="function">g_socket_send()</code></a> even if you were previously
1626
 
notified of a <code class="literal">G_IO_OUT</code> condition. (On Windows in particular, this is
 
1626
notified of a <a href="http://library.gnome.org/devel/glib/unstable/glib-IO-Channels.html#G-IO-OUT:CAPS"><code class="literal">G_IO_OUT</code></a> condition. (On Windows in particular, this is
1627
1627
very common due to the way the underlying APIs work.)</p>
1628
1628
<p>On error -1 is returned and <em class="parameter"><code>error</code></em>
1629
1629
 is set accordingly.</p>
1643
1643
</tr>
1644
1644
<tr>
1645
1645
<td class="parameter_name"><p>address</p></td>
1646
 
<td class="parameter_description"><p> a <a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="type">GSocketAddress</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
 
1646
<td class="parameter_description"><p> a <a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="type">GSocketAddress</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
1647
1647
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1648
1648
</tr>
1649
1649
<tr>
1660
1660
<tr>
1661
1661
<td class="parameter_name"><p>messages</p></td>
1662
1662
<td class="parameter_description"><p> a pointer to an
1663
 
array of <a href="GSocketControlMessage.html"><span class="type">GSocketControlMessages</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
 
1663
array of <a href="GSocketControlMessage.html"><span class="type">GSocketControlMessages</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
1664
1664
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=num_messages][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1665
1665
</tr>
1666
1666
<tr>
1676
1676
</tr>
1677
1677
<tr>
1678
1678
<td class="parameter_name"><p>cancellable</p></td>
1679
 
<td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><code class="literal">GCancellable</code></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
 
1679
<td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><code class="literal">GCancellable</code></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
1680
1680
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1681
1681
</tr>
1682
1682
<tr>
1683
1683
<td class="parameter_name"><p>error</p></td>
1684
 
<td class="parameter_description"><p><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
 
1684
<td class="parameter_description"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
1685
1685
<td class="parameter_annotations"> </td>
1686
1686
</tr>
1687
1687
</tbody>
1699
1699
<hr>
1700
1700
<div class="refsect2">
1701
1701
<a name="g-socket-send-with-blocking"></a><h3>g_socket_send_with_blocking ()</h3>
1702
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>
 
1702
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>
1703
1703
g_socket_send_with_blocking (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>,
1704
 
                             <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *buffer</code></em>,
1705
 
                             <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>,
1706
 
                             <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> blocking</code></em>,
 
1704
                             <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *buffer</code></em>,
 
1705
                             <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>,
 
1706
                             <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> blocking</code></em>,
1707
1707
                             <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
1708
 
                             <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
1708
                             <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
1709
1709
<p>This behaves exactly the same as <a class="link" href="GSocket.html#g-socket-send" title="g_socket_send ()"><code class="function">g_socket_send()</code></a>, except that
1710
1710
the choice of blocking or non-blocking behavior is determined by
1711
1711
the <em class="parameter"><code>blocking</code></em>
1743
1743
</tr>
1744
1744
<tr>
1745
1745
<td class="parameter_name"><p>cancellable</p></td>
1746
 
<td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><code class="literal">GCancellable</code></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
 
1746
<td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><code class="literal">GCancellable</code></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
1747
1747
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1748
1748
</tr>
1749
1749
<tr>
1750
1750
<td class="parameter_name"><p>error</p></td>
1751
 
<td class="parameter_description"><p><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
 
1751
<td class="parameter_description"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
1752
1752
<td class="parameter_annotations"> </td>
1753
1753
</tr>
1754
1754
</tbody>
1766
1766
<hr>
1767
1767
<div class="refsect2">
1768
1768
<a name="g-socket-close"></a><h3>g_socket_close ()</h3>
1769
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
1769
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
1770
1770
g_socket_close (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>,
1771
 
                <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
1771
                <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
1772
1772
<p>Closes the socket, shutting down any active connection.</p>
1773
1773
<p>Closing a socket does not wait for all outstanding I/O operations
1774
1774
to finish, so the caller should not rely on them to be guaranteed
1781
1781
resources are released as early as possible.</p>
1782
1782
<p>Beware that due to the way that TCP works, it is possible for
1783
1783
recently-sent data to be lost if either you close a socket while the
1784
 
<code class="literal">G_IO_IN</code> condition is set, or else if the remote connection tries to
 
1784
<a href="http://library.gnome.org/devel/glib/unstable/glib-IO-Channels.html#G-IO-IN:CAPS"><code class="literal">G_IO_IN</code></a> condition is set, or else if the remote connection tries to
1785
1785
send something to you after you close the socket but before it has
1786
1786
finished reading all of the data you sent. There is no easy generic
1787
1787
way to avoid this problem; the easiest fix is to design the network
1811
1811
</tr>
1812
1812
<tr>
1813
1813
<td class="parameter_name"><p>error</p></td>
1814
 
<td class="parameter_description"><p><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
 
1814
<td class="parameter_description"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
1815
1815
<td class="parameter_annotations"> </td>
1816
1816
</tr>
1817
1817
</tbody>
1819
1819
</div>
1820
1820
<div class="refsect3">
1821
1821
<a name="id-1.4.13.2.10.18.10"></a><h4>Returns</h4>
1822
 
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on error</p>
 
1822
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on error</p>
1823
1823
<p></p>
1824
1824
</div>
1825
1825
<p class="since">Since 2.22</p>
1827
1827
<hr>
1828
1828
<div class="refsect2">
1829
1829
<a name="g-socket-is-closed"></a><h3>g_socket_is_closed ()</h3>
1830
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
1830
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
1831
1831
g_socket_is_closed (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>);</pre>
1832
1832
<p>Checks whether a socket is closed.</p>
1833
1833
<div class="refsect3">
1847
1847
</div>
1848
1848
<div class="refsect3">
1849
1849
<a name="id-1.4.13.2.10.19.6"></a><h4>Returns</h4>
1850
 
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if socket is closed, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
 
1850
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if socket is closed, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
1851
1851
<p></p>
1852
1852
</div>
1853
1853
<p class="since">Since 2.22</p>
1855
1855
<hr>
1856
1856
<div class="refsect2">
1857
1857
<a name="g-socket-shutdown"></a><h3>g_socket_shutdown ()</h3>
1858
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
1858
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
1859
1859
g_socket_shutdown (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>,
1860
 
                   <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> shutdown_read</code></em>,
1861
 
                   <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> shutdown_write</code></em>,
1862
 
                   <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
1860
                   <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> shutdown_read</code></em>,
 
1861
                   <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> shutdown_write</code></em>,
 
1862
                   <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
1863
1863
<p>Shut down part of a full-duplex connection.</p>
1864
1864
<p>If <em class="parameter"><code>shutdown_read</code></em>
1865
 
 is <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> then the receiving side of the connection
 
1865
 is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> then the receiving side of the connection
1866
1866
is shut down, and further reading is disallowed.</p>
1867
1867
<p>If <em class="parameter"><code>shutdown_write</code></em>
1868
 
 is <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> then the sending side of the connection
 
1868
 is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> then the sending side of the connection
1869
1869
is shut down, and further writing is disallowed.</p>
1870
1870
<p>It is allowed for both <em class="parameter"><code>shutdown_read</code></em>
1871
1871
 and <em class="parameter"><code>shutdown_write</code></em>
1872
 
 to be <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>.</p>
 
1872
 to be <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>.</p>
1873
1873
<p>One example where this is used is graceful disconnect for TCP connections
1874
1874
where you close the sending side, then wait for the other side to close
1875
1875
the connection, thus ensuring that the other side saw all sent data.</p>
1899
1899
</tr>
1900
1900
<tr>
1901
1901
<td class="parameter_name"><p>error</p></td>
1902
 
<td class="parameter_description"><p><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
 
1902
<td class="parameter_description"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
1903
1903
<td class="parameter_annotations"> </td>
1904
1904
</tr>
1905
1905
</tbody>
1907
1907
</div>
1908
1908
<div class="refsect3">
1909
1909
<a name="id-1.4.13.2.10.20.10"></a><h4>Returns</h4>
1910
 
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on error</p>
 
1910
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on error</p>
1911
1911
<p></p>
1912
1912
</div>
1913
1913
<p class="since">Since 2.22</p>
1915
1915
<hr>
1916
1916
<div class="refsect2">
1917
1917
<a name="g-socket-is-connected"></a><h3>g_socket_is_connected ()</h3>
1918
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
1918
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
1919
1919
g_socket_is_connected (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>);</pre>
1920
1920
<p>Check whether the socket is connected. This is only useful for
1921
1921
connection-oriented sockets.</p>
1936
1936
</div>
1937
1937
<div class="refsect3">
1938
1938
<a name="id-1.4.13.2.10.21.6"></a><h4>Returns</h4>
1939
 
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if socket is connected, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
 
1939
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if socket is connected, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
1940
1940
<p></p>
1941
1941
</div>
1942
1942
<p class="since">Since 2.22</p>
1944
1944
<hr>
1945
1945
<div class="refsect2">
1946
1946
<a name="g-socket-create-source"></a><h3>g_socket_create_source ()</h3>
1947
 
<pre class="programlisting"><a href="../glib/glib-The-Main-Event-Loop.html#GSource"><span class="returnvalue">GSource</span></a> *
 
1947
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GSource"><span class="returnvalue">GSource</span></a> *
1948
1948
g_socket_create_source (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>,
1949
 
                        <em class="parameter"><code><a href="../glib/glib-IO-Channels.html#GIOCondition"><span class="type">GIOCondition</span></a> condition</code></em>,
 
1949
                        <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-IO-Channels.html#GIOCondition"><span class="type">GIOCondition</span></a> condition</code></em>,
1950
1950
                        <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>);</pre>
1951
 
<p>Creates a <a href="../glib/glib-The-Main-Event-Loop.html#GSource"><code class="literal">GSource</code></a> that can be attached to a <a href="../glib/glib-The-Main-Event-Loop.html#GMainContext"><code class="literal">GMainContext</code></a> to monitor
 
1951
<p>Creates a <a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GSource"><code class="literal">GSource</code></a> that can be attached to a <a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GMainContext"><code class="literal">GMainContext</code></a> to monitor
1952
1952
for the availability of the specified <em class="parameter"><code>condition</code></em>
1953
1953
 on the socket.</p>
1954
1954
<p>The callback on the source is of the <a class="link" href="GSocket.html#GSocketSourceFunc" title="GSocketSourceFunc ()"><span class="type">GSocketSourceFunc</span></a> type.</p>
1955
 
<p>It is meaningless to specify <code class="literal">G_IO_ERR</code> or <code class="literal">G_IO_HUP</code> in <em class="parameter"><code>condition</code></em>
 
1955
<p>It is meaningless to specify <a href="http://library.gnome.org/devel/glib/unstable/glib-IO-Channels.html#G-IO-ERR:CAPS"><code class="literal">G_IO_ERR</code></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-IO-Channels.html#G-IO-HUP:CAPS"><code class="literal">G_IO_HUP</code></a> in <em class="parameter"><code>condition</code></em>
1956
1956
;
1957
1957
these conditions will always be reported output if they are true.</p>
1958
1958
<p><em class="parameter"><code>cancellable</code></em>
1959
 
 if not <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> can be used to cancel the source, which will
 
1959
 if not <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> can be used to cancel the source, which will
1960
1960
cause the source to trigger, reporting the current condition (which
1961
1961
is likely 0 unless cancellation happened at the same time as a
1962
1962
condition change). You can check for this in the callback using
1964
1964
<p>If <em class="parameter"><code>socket</code></em>
1965
1965
 has a timeout set, and it is reached before <em class="parameter"><code>condition</code></em>
1966
1966
 
1967
 
occurs, the source will then trigger anyway, reporting <code class="literal">G_IO_IN</code> or
1968
 
<code class="literal">G_IO_OUT</code> depending on <em class="parameter"><code>condition</code></em>
 
1967
occurs, the source will then trigger anyway, reporting <a href="http://library.gnome.org/devel/glib/unstable/glib-IO-Channels.html#G-IO-IN:CAPS"><code class="literal">G_IO_IN</code></a> or
 
1968
<a href="http://library.gnome.org/devel/glib/unstable/glib-IO-Channels.html#G-IO-OUT:CAPS"><code class="literal">G_IO_OUT</code></a> depending on <em class="parameter"><code>condition</code></em>
1969
1969
. However, <em class="parameter"><code>socket</code></em>
1970
1970
 will have been
1971
1971
marked as having had a timeout, and so the next <a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> I/O method
1986
1986
</tr>
1987
1987
<tr>
1988
1988
<td class="parameter_name"><p>condition</p></td>
1989
 
<td class="parameter_description"><p>a <a href="../glib/glib-IO-Channels.html#GIOCondition"><span class="type">GIOCondition</span></a> mask to monitor</p></td>
 
1989
<td class="parameter_description"><p>a <a href="http://library.gnome.org/devel/glib/unstable/glib-IO-Channels.html#GIOCondition"><span class="type">GIOCondition</span></a> mask to monitor</p></td>
1990
1990
<td class="parameter_annotations"> </td>
1991
1991
</tr>
1992
1992
<tr>
1993
1993
<td class="parameter_name"><p>cancellable</p></td>
1994
 
<td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><code class="literal">GCancellable</code></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
 
1994
<td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><code class="literal">GCancellable</code></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
1995
1995
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1996
1996
</tr>
1997
1997
</tbody>
1999
1999
</div>
2000
2000
<div class="refsect3">
2001
2001
<a name="id-1.4.13.2.10.22.10"></a><h4>Returns</h4>
2002
 
<p> a newly allocated <a href="../glib/glib-The-Main-Event-Loop.html#GSource"><code class="literal">GSource</code></a>, free with <a href="../glib/glib-The-Main-Event-Loop.html#g-source-unref"><code class="function">g_source_unref()</code></a>. </p>
 
2002
<p> a newly allocated <a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GSource"><code class="literal">GSource</code></a>, free with <a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#g-source-unref"><code class="function">g_source_unref()</code></a>. </p>
2003
2003
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
2004
2004
</div>
2005
2005
<p class="since">Since 2.22</p>
2007
2007
<hr>
2008
2008
<div class="refsect2">
2009
2009
<a name="g-socket-condition-check"></a><h3>g_socket_condition_check ()</h3>
2010
 
<pre class="programlisting"><a href="../glib/glib-IO-Channels.html#GIOCondition"><span class="returnvalue">GIOCondition</span></a>
 
2010
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-IO-Channels.html#GIOCondition"><span class="returnvalue">GIOCondition</span></a>
2011
2011
g_socket_condition_check (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>,
2012
 
                          <em class="parameter"><code><a href="../glib/glib-IO-Channels.html#GIOCondition"><span class="type">GIOCondition</span></a> condition</code></em>);</pre>
 
2012
                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-IO-Channels.html#GIOCondition"><span class="type">GIOCondition</span></a> condition</code></em>);</pre>
2013
2013
<p>Checks on the readiness of <em class="parameter"><code>socket</code></em>
2014
2014
 to perform operations.
2015
2015
The operations specified in <em class="parameter"><code>condition</code></em>
2024
2024
writing to the socket if it succeeds, it is generally better to
2025
2025
simply try writing to the socket right away, and try again later if
2026
2026
the initial attempt returns <a class="link" href="gio-GIOError.html#G-IO-ERROR-WOULD-BLOCK:CAPS"><code class="literal">G_IO_ERROR_WOULD_BLOCK</code></a>.</p>
2027
 
<p>It is meaningless to specify <code class="literal">G_IO_ERR</code> or <code class="literal">G_IO_HUP</code> in condition;
 
2027
<p>It is meaningless to specify <a href="http://library.gnome.org/devel/glib/unstable/glib-IO-Channels.html#G-IO-ERR:CAPS"><code class="literal">G_IO_ERR</code></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-IO-Channels.html#G-IO-HUP:CAPS"><code class="literal">G_IO_HUP</code></a> in condition;
2028
2028
these conditions will always be set in the output if they are true.</p>
2029
2029
<p>This call never blocks.</p>
2030
2030
<div class="refsect3">
2043
2043
</tr>
2044
2044
<tr>
2045
2045
<td class="parameter_name"><p>condition</p></td>
2046
 
<td class="parameter_description"><p>a <a href="../glib/glib-IO-Channels.html#GIOCondition"><span class="type">GIOCondition</span></a> mask to check</p></td>
 
2046
<td class="parameter_description"><p>a <a href="http://library.gnome.org/devel/glib/unstable/glib-IO-Channels.html#GIOCondition"><span class="type">GIOCondition</span></a> mask to check</p></td>
2047
2047
<td class="parameter_annotations"> </td>
2048
2048
</tr>
2049
2049
</tbody>
2060
2060
<hr>
2061
2061
<div class="refsect2">
2062
2062
<a name="g-socket-condition-wait"></a><h3>g_socket_condition_wait ()</h3>
2063
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
2063
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
2064
2064
g_socket_condition_wait (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>,
2065
 
                         <em class="parameter"><code><a href="../glib/glib-IO-Channels.html#GIOCondition"><span class="type">GIOCondition</span></a> condition</code></em>,
 
2065
                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-IO-Channels.html#GIOCondition"><span class="type">GIOCondition</span></a> condition</code></em>,
2066
2066
                         <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
2067
 
                         <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
2067
                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
2068
2068
<p>Waits for <em class="parameter"><code>condition</code></em>
2069
2069
 to become true on <em class="parameter"><code>socket</code></em>
2070
2070
. When the condition
2071
 
is met, <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> is returned.</p>
 
2071
is met, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> is returned.</p>
2072
2072
<p>If <em class="parameter"><code>cancellable</code></em>
2073
2073
 is cancelled before the condition is met, or if the
2074
2074
socket has a timeout set and it is reached before the condition is
2075
 
met, then <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> is returned and <em class="parameter"><code>error</code></em>
2076
 
, if non-<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, is set to
 
2075
met, then <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> is returned and <em class="parameter"><code>error</code></em>
 
2076
, if non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, is set to
2077
2077
the appropriate value (<a class="link" href="gio-GIOError.html#G-IO-ERROR-CANCELLED:CAPS"><code class="literal">G_IO_ERROR_CANCELLED</code></a> or
2078
2078
<a class="link" href="gio-GIOError.html#G-IO-ERROR-TIMED-OUT:CAPS"><code class="literal">G_IO_ERROR_TIMED_OUT</code></a>).</p>
2079
2079
<p>See also <a class="link" href="GSocket.html#g-socket-condition-timed-wait" title="g_socket_condition_timed_wait ()"><code class="function">g_socket_condition_timed_wait()</code></a>.</p>
2093
2093
</tr>
2094
2094
<tr>
2095
2095
<td class="parameter_name"><p>condition</p></td>
2096
 
<td class="parameter_description"><p>a <a href="../glib/glib-IO-Channels.html#GIOCondition"><span class="type">GIOCondition</span></a> mask to wait for</p></td>
 
2096
<td class="parameter_description"><p>a <a href="http://library.gnome.org/devel/glib/unstable/glib-IO-Channels.html#GIOCondition"><span class="type">GIOCondition</span></a> mask to wait for</p></td>
2097
2097
<td class="parameter_annotations"> </td>
2098
2098
</tr>
2099
2099
<tr>
2100
2100
<td class="parameter_name"><p>cancellable</p></td>
2101
 
<td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
 
2101
<td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
2102
2102
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
2103
2103
</tr>
2104
2104
<tr>
2105
2105
<td class="parameter_name"><p>error</p></td>
2106
 
<td class="parameter_description"><p>a <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> pointer, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
 
2106
<td class="parameter_description"><p>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> pointer, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
2107
2107
<td class="parameter_annotations"> </td>
2108
2108
</tr>
2109
2109
</tbody>
2111
2111
</div>
2112
2112
<div class="refsect3">
2113
2113
<a name="id-1.4.13.2.10.24.8"></a><h4>Returns</h4>
2114
 
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the condition was met, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
 
2114
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the condition was met, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
2115
2115
<p></p>
2116
2116
</div>
2117
2117
<p class="since">Since 2.22</p>
2119
2119
<hr>
2120
2120
<div class="refsect2">
2121
2121
<a name="g-socket-condition-timed-wait"></a><h3>g_socket_condition_timed_wait ()</h3>
2122
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
2122
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
2123
2123
g_socket_condition_timed_wait (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>,
2124
 
                               <em class="parameter"><code><a href="../glib/glib-IO-Channels.html#GIOCondition"><span class="type">GIOCondition</span></a> condition</code></em>,
2125
 
                               <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint64"><span class="type">gint64</span></a> timeout</code></em>,
 
2124
                               <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-IO-Channels.html#GIOCondition"><span class="type">GIOCondition</span></a> condition</code></em>,
 
2125
                               <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="type">gint64</span></a> timeout</code></em>,
2126
2126
                               <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
2127
 
                               <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
2127
                               <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
2128
2128
<p>Waits for up to <em class="parameter"><code>timeout</code></em>
2129
2129
 microseconds for <em class="parameter"><code>condition</code></em>
2130
2130
 to become true
2131
2131
on <em class="parameter"><code>socket</code></em>
2132
 
. If the condition is met, <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> is returned.</p>
 
2132
. If the condition is met, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> is returned.</p>
2133
2133
<p>If <em class="parameter"><code>cancellable</code></em>
2134
2134
 is cancelled before the condition is met, or if
2135
2135
<em class="parameter"><code>timeout</code></em>
2136
2136
 (or the socket's <a class="link" href="GSocket.html#GSocket--timeout" title="The “timeout” property"><span class="type">“timeout”</span></a>) is reached before the
2137
 
condition is met, then <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> is returned and <em class="parameter"><code>error</code></em>
2138
 
, if non-<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>,
 
2137
condition is met, then <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> is returned and <em class="parameter"><code>error</code></em>
 
2138
, if non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>,
2139
2139
is set to the appropriate value (<a class="link" href="gio-GIOError.html#G-IO-ERROR-CANCELLED:CAPS"><code class="literal">G_IO_ERROR_CANCELLED</code></a> or
2140
2140
<a class="link" href="gio-GIOError.html#G-IO-ERROR-TIMED-OUT:CAPS"><code class="literal">G_IO_ERROR_TIMED_OUT</code></a>).</p>
2141
2141
<p>If you don't want a timeout, use <a class="link" href="GSocket.html#g-socket-condition-wait" title="g_socket_condition_wait ()"><code class="function">g_socket_condition_wait()</code></a>.
2163
2163
</tr>
2164
2164
<tr>
2165
2165
<td class="parameter_name"><p>condition</p></td>
2166
 
<td class="parameter_description"><p>a <a href="../glib/glib-IO-Channels.html#GIOCondition"><span class="type">GIOCondition</span></a> mask to wait for</p></td>
 
2166
<td class="parameter_description"><p>a <a href="http://library.gnome.org/devel/glib/unstable/glib-IO-Channels.html#GIOCondition"><span class="type">GIOCondition</span></a> mask to wait for</p></td>
2167
2167
<td class="parameter_annotations"> </td>
2168
2168
</tr>
2169
2169
<tr>
2173
2173
</tr>
2174
2174
<tr>
2175
2175
<td class="parameter_name"><p>cancellable</p></td>
2176
 
<td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
 
2176
<td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
2177
2177
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
2178
2178
</tr>
2179
2179
<tr>
2180
2180
<td class="parameter_name"><p>error</p></td>
2181
 
<td class="parameter_description"><p>a <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> pointer, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
 
2181
<td class="parameter_description"><p>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> pointer, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
2182
2182
<td class="parameter_annotations"> </td>
2183
2183
</tr>
2184
2184
</tbody>
2186
2186
</div>
2187
2187
<div class="refsect3">
2188
2188
<a name="id-1.4.13.2.10.25.9"></a><h4>Returns</h4>
2189
 
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the condition was met, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
 
2189
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the condition was met, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
2190
2190
<p></p>
2191
2191
</div>
2192
2192
<p class="since">Since 2.32</p>
2194
2194
<hr>
2195
2195
<div class="refsect2">
2196
2196
<a name="g-socket-get-available-bytes"></a><h3>g_socket_get_available_bytes ()</h3>
2197
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>
 
2197
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>
2198
2198
g_socket_get_available_bytes (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>);</pre>
2199
2199
<p>Get the amount of data pending in the OS input buffer.</p>
2200
2200
<p>If <em class="parameter"><code>socket</code></em>
2235
2235
<a name="g-socket-set-listen-backlog"></a><h3>g_socket_set_listen_backlog ()</h3>
2236
2236
<pre class="programlisting"><span class="returnvalue">void</span>
2237
2237
g_socket_set_listen_backlog (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>,
2238
 
                             <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> backlog</code></em>);</pre>
 
2238
                             <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> backlog</code></em>);</pre>
2239
2239
<p>Sets the maximum number of outstanding connections allowed
2240
2240
when listening on this socket. If more clients than this are
2241
2241
connecting to the socket and the application is not handling them
2269
2269
<hr>
2270
2270
<div class="refsect2">
2271
2271
<a name="g-socket-get-listen-backlog"></a><h3>g_socket_get_listen_backlog ()</h3>
2272
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
 
2272
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
2273
2273
g_socket_get_listen_backlog (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>);</pre>
2274
2274
<p>Gets the listen backlog setting of the socket. For details on this,
2275
2275
see <a class="link" href="GSocket.html#g-socket-set-listen-backlog" title="g_socket_set_listen_backlog ()"><code class="function">g_socket_set_listen_backlog()</code></a>.</p>
2298
2298
<hr>
2299
2299
<div class="refsect2">
2300
2300
<a name="g-socket-get-blocking"></a><h3>g_socket_get_blocking ()</h3>
2301
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
2301
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
2302
2302
g_socket_get_blocking (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>);</pre>
2303
2303
<p>Gets the blocking mode of the socket. For details on blocking I/O,
2304
2304
see <a class="link" href="GSocket.html#g-socket-set-blocking" title="g_socket_set_blocking ()"><code class="function">g_socket_set_blocking()</code></a>.</p>
2319
2319
</div>
2320
2320
<div class="refsect3">
2321
2321
<a name="id-1.4.13.2.10.29.6"></a><h4>Returns</h4>
2322
 
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if blocking I/O is used, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
 
2322
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if blocking I/O is used, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
2323
2323
<p></p>
2324
2324
</div>
2325
2325
<p class="since">Since 2.22</p>
2329
2329
<a name="g-socket-set-blocking"></a><h3>g_socket_set_blocking ()</h3>
2330
2330
<pre class="programlisting"><span class="returnvalue">void</span>
2331
2331
g_socket_set_blocking (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>,
2332
 
                       <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> blocking</code></em>);</pre>
 
2332
                       <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> blocking</code></em>);</pre>
2333
2333
<p>Sets the blocking mode of the socket. In blocking mode
2334
2334
all operations block until they succeed or there is an error. In
2335
2335
non-blocking mode all functions return results immediately or
2364
2364
<hr>
2365
2365
<div class="refsect2">
2366
2366
<a name="g-socket-get-keepalive"></a><h3>g_socket_get_keepalive ()</h3>
2367
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
2367
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
2368
2368
g_socket_get_keepalive (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>);</pre>
2369
2369
<p>Gets the keepalive mode of the socket. For details on this,
2370
2370
see <a class="link" href="GSocket.html#g-socket-set-keepalive" title="g_socket_set_keepalive ()"><code class="function">g_socket_set_keepalive()</code></a>.</p>
2385
2385
</div>
2386
2386
<div class="refsect3">
2387
2387
<a name="id-1.4.13.2.10.31.6"></a><h4>Returns</h4>
2388
 
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if keepalive is active, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
 
2388
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if keepalive is active, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
2389
2389
<p></p>
2390
2390
</div>
2391
2391
<p class="since">Since 2.22</p>
2395
2395
<a name="g-socket-set-keepalive"></a><h3>g_socket_set_keepalive ()</h3>
2396
2396
<pre class="programlisting"><span class="returnvalue">void</span>
2397
2397
g_socket_set_keepalive (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>,
2398
 
                        <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> keepalive</code></em>);</pre>
 
2398
                        <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> keepalive</code></em>);</pre>
2399
2399
<p>Sets or unsets the <code class="literal">SO_KEEPALIVE</code> flag on the underlying socket. When
2400
2400
this flag is set on a socket, the system will attempt to verify that the
2401
2401
remote socket endpoint is still present if a sufficiently long period of
2436
2436
<hr>
2437
2437
<div class="refsect2">
2438
2438
<a name="g-socket-get-timeout"></a><h3>g_socket_get_timeout ()</h3>
2439
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
 
2439
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
2440
2440
g_socket_get_timeout (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>);</pre>
2441
2441
<p>Gets the timeout setting of the socket. For details on this, see
2442
2442
<a class="link" href="GSocket.html#g-socket-set-timeout" title="g_socket_set_timeout ()"><code class="function">g_socket_set_timeout()</code></a>.</p>
2467
2467
<a name="g-socket-set-timeout"></a><h3>g_socket_set_timeout ()</h3>
2468
2468
<pre class="programlisting"><span class="returnvalue">void</span>
2469
2469
g_socket_set_timeout (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>,
2470
 
                      <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> timeout</code></em>);</pre>
 
2470
                      <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> timeout</code></em>);</pre>
2471
2471
<p>Sets the time in seconds after which I/O operations on <em class="parameter"><code>socket</code></em>
2472
2472
 will
2473
2473
time out if they have not yet completed.</p>
2518
2518
<a name="g-socket-set-ttl"></a><h3>g_socket_set_ttl ()</h3>
2519
2519
<pre class="programlisting"><span class="returnvalue">void</span>
2520
2520
g_socket_set_ttl (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>,
2521
 
                  <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> ttl</code></em>);</pre>
 
2521
                  <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> ttl</code></em>);</pre>
2522
2522
<p>Sets the time-to-live for outgoing unicast packets on <em class="parameter"><code>socket</code></em>
2523
2523
.
2524
2524
By default the platform-specific default value is used.</p>
2550
2550
<hr>
2551
2551
<div class="refsect2">
2552
2552
<a name="g-socket-get-ttl"></a><h3>g_socket_get_ttl ()</h3>
2553
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
 
2553
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
2554
2554
g_socket_get_ttl (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>);</pre>
2555
2555
<p>Gets the unicast time-to-live setting on <em class="parameter"><code>socket</code></em>
2556
2556
; see
2581
2581
<hr>
2582
2582
<div class="refsect2">
2583
2583
<a name="g-socket-get-broadcast"></a><h3>g_socket_get_broadcast ()</h3>
2584
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
2584
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
2585
2585
g_socket_get_broadcast (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>);</pre>
2586
2586
<p>Gets the broadcast setting on <em class="parameter"><code>socket</code></em>
2587
 
; if <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>,
 
2587
; if <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>,
2588
2588
it is possible to send packets to broadcast
2589
2589
addresses.</p>
2590
2590
<div class="refsect3">
2615
2615
<a name="g-socket-set-broadcast"></a><h3>g_socket_set_broadcast ()</h3>
2616
2616
<pre class="programlisting"><span class="returnvalue">void</span>
2617
2617
g_socket_set_broadcast (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>,
2618
 
                        <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> broadcast</code></em>);</pre>
 
2618
                        <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> broadcast</code></em>);</pre>
2619
2619
<p>Sets whether <em class="parameter"><code>socket</code></em>
2620
2620
 should allow sending to broadcast addresses.
2621
 
This is <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> by default.</p>
 
2621
This is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> by default.</p>
2622
2622
<div class="refsect3">
2623
2623
<a name="id-1.4.13.2.10.38.5"></a><h4>Parameters</h4>
2624
2624
<div class="informaltable"><table width="100%" border="0">
2648
2648
<hr>
2649
2649
<div class="refsect2">
2650
2650
<a name="g-socket-get-option"></a><h3>g_socket_get_option ()</h3>
2651
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
2651
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
2652
2652
g_socket_get_option (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>,
2653
 
                     <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> level</code></em>,
2654
 
                     <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> optname</code></em>,
2655
 
                     <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *value</code></em>,
2656
 
                     <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
2653
                     <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> level</code></em>,
 
2654
                     <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> optname</code></em>,
 
2655
                     <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *value</code></em>,
 
2656
                     <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
2657
2657
<p>Gets the value of an integer-valued option on <em class="parameter"><code>socket</code></em>
2658
2658
, as with
2659
2659
<code class="function">getsockopt()</code>. (If you need to fetch a  non-integer-valued option,
2665
2665
headers.</p>
2666
2666
<p>Note that even for socket options that are a single byte in size,
2667
2667
<em class="parameter"><code>value</code></em>
2668
 
 is still a pointer to a <a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> variable, not a <a href="../glib/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a>;
 
2668
 is still a pointer to a <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> variable, not a <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a>;
2669
2669
<a class="link" href="GSocket.html#g-socket-get-option" title="g_socket_get_option ()"><code class="function">g_socket_get_option()</code></a> will handle the conversion internally.</p>
2670
2670
<div class="refsect3">
2671
2671
<a name="id-1.4.13.2.10.39.7"></a><h4>Parameters</h4>
2698
2698
</tr>
2699
2699
<tr>
2700
2700
<td class="parameter_name"><p>error</p></td>
2701
 
<td class="parameter_description"><p><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
 
2701
<td class="parameter_description"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
2702
2702
<td class="parameter_annotations"> </td>
2703
2703
</tr>
2704
2704
</tbody>
2717
2717
<hr>
2718
2718
<div class="refsect2">
2719
2719
<a name="g-socket-set-option"></a><h3>g_socket_set_option ()</h3>
2720
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
2720
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
2721
2721
g_socket_set_option (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>,
2722
 
                     <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> level</code></em>,
2723
 
                     <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> optname</code></em>,
2724
 
                     <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> value</code></em>,
2725
 
                     <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
2722
                     <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> level</code></em>,
 
2723
                     <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> optname</code></em>,
 
2724
                     <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> value</code></em>,
 
2725
                     <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
2726
2726
<p>Sets the value of an integer-valued option on <em class="parameter"><code>socket</code></em>
2727
2727
, as with
2728
2728
<code class="function">setsockopt()</code>. (If you need to set a non-integer-valued option,
2763
2763
</tr>
2764
2764
<tr>
2765
2765
<td class="parameter_name"><p>error</p></td>
2766
 
<td class="parameter_description"><p><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
 
2766
<td class="parameter_description"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
2767
2767
<td class="parameter_annotations"> </td>
2768
2768
</tr>
2769
2769
</tbody>
2844
2844
<a name="g-socket-get-local-address"></a><h3>g_socket_get_local_address ()</h3>
2845
2845
<pre class="programlisting"><a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="returnvalue">GSocketAddress</span></a> *
2846
2846
g_socket_get_local_address (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>,
2847
 
                            <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
2847
                            <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
2848
2848
<p>Try to get the local address of a bound socket. This is only
2849
2849
useful if the socket has been bound to a local address,
2850
2850
either explicitly or implicitly when connecting.</p>
2864
2864
</tr>
2865
2865
<tr>
2866
2866
<td class="parameter_name"><p>error</p></td>
2867
 
<td class="parameter_description"><p><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
 
2867
<td class="parameter_description"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
2868
2868
<td class="parameter_annotations"> </td>
2869
2869
</tr>
2870
2870
</tbody>
2872
2872
</div>
2873
2873
<div class="refsect3">
2874
2874
<a name="id-1.4.13.2.10.43.6"></a><h4>Returns</h4>
2875
 
<p> a <a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="type">GSocketAddress</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
2876
 
Free the returned object with <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
 
2875
<p> a <a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="type">GSocketAddress</span></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
 
2876
Free the returned object with <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
2877
2877
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
2878
2878
</div>
2879
2879
<p class="since">Since 2.22</p>
2912
2912
<a name="g-socket-get-remote-address"></a><h3>g_socket_get_remote_address ()</h3>
2913
2913
<pre class="programlisting"><a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="returnvalue">GSocketAddress</span></a> *
2914
2914
g_socket_get_remote_address (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>,
2915
 
                             <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
2915
                             <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
2916
2916
<p>Try to get the remove address of a connected socket. This is only
2917
2917
useful for connection oriented sockets that have been connected.</p>
2918
2918
<div class="refsect3">
2931
2931
</tr>
2932
2932
<tr>
2933
2933
<td class="parameter_name"><p>error</p></td>
2934
 
<td class="parameter_description"><p><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
 
2934
<td class="parameter_description"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
2935
2935
<td class="parameter_annotations"> </td>
2936
2936
</tr>
2937
2937
</tbody>
2939
2939
</div>
2940
2940
<div class="refsect3">
2941
2941
<a name="id-1.4.13.2.10.45.6"></a><h4>Returns</h4>
2942
 
<p> a <a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="type">GSocketAddress</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
2943
 
Free the returned object with <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
 
2942
<p> a <a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="type">GSocketAddress</span></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.
 
2943
Free the returned object with <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
2944
2944
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
2945
2945
</div>
2946
2946
<p class="since">Since 2.22</p>
2976
2976
<hr>
2977
2977
<div class="refsect2">
2978
2978
<a name="g-socket-speaks-ipv4"></a><h3>g_socket_speaks_ipv4 ()</h3>
2979
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
2979
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
2980
2980
g_socket_speaks_ipv4 (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>);</pre>
2981
2981
<p>Checks if a socket is capable of speaking IPv4.</p>
2982
2982
<p>IPv4 sockets are capable of speaking IPv4.  On some operating systems
3002
3002
</div>
3003
3003
<div class="refsect3">
3004
3004
<a name="id-1.4.13.2.10.47.8"></a><h4>Returns</h4>
3005
 
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if this socket can be used with IPv4.</p>
 
3005
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if this socket can be used with IPv4.</p>
3006
3006
<p></p>
3007
3007
</div>
3008
3008
<p class="since">Since 2.22</p>
3012
3012
<a name="g-socket-get-credentials"></a><h3>g_socket_get_credentials ()</h3>
3013
3013
<pre class="programlisting"><a class="link" href="GCredentials.html" title="GCredentials"><span class="returnvalue">GCredentials</span></a> *
3014
3014
g_socket_get_credentials (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>,
3015
 
                          <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
3015
                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
3016
3016
<p>Returns the credentials of the foreign process connected to this
3017
3017
socket, if any (e.g. it is only supported for <a class="link" href="GSocketAddress.html#G-SOCKET-FAMILY-UNIX:CAPS"><code class="literal">G_SOCKET_FAMILY_UNIX</code></a>
3018
3018
sockets).</p>
3039
3039
</tr>
3040
3040
<tr>
3041
3041
<td class="parameter_name"><p>error</p></td>
3042
 
<td class="parameter_description"><p><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
 
3042
<td class="parameter_description"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
3043
3043
<td class="parameter_annotations"> </td>
3044
3044
</tr>
3045
3045
</tbody>
3047
3047
</div>
3048
3048
<div class="refsect3">
3049
3049
<a name="id-1.4.13.2.10.48.8"></a><h4>Returns</h4>
3050
 
<p> <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>error</code></em>
 
3050
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>error</code></em>
3051
3051
is set, otherwise a <a class="link" href="GCredentials.html" title="GCredentials"><span class="type">GCredentials</span></a> object
3052
 
that must be freed with <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
 
3052
that must be freed with <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
3053
3053
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
3054
3054
</div>
3055
3055
<p class="since">Since 2.26</p>
3057
3057
<hr>
3058
3058
<div class="refsect2">
3059
3059
<a name="g-socket-join-multicast-group"></a><h3>g_socket_join_multicast_group ()</h3>
3060
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
3060
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
3061
3061
g_socket_join_multicast_group (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>,
3062
3062
                               <em class="parameter"><code><a class="link" href="GInetAddress.html" title="GInetAddress"><span class="type">GInetAddress</span></a> *group</code></em>,
3063
 
                               <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> source_specific</code></em>,
3064
 
                               <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *iface</code></em>,
3065
 
                               <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
3063
                               <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> source_specific</code></em>,
 
3064
                               <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *iface</code></em>,
 
3065
                               <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
3066
3066
<p>Registers <em class="parameter"><code>socket</code></em>
3067
3067
 to receive multicast messages sent to <em class="parameter"><code>group</code></em>
3068
3068
.
3071
3071
been bound to an appropriate interface and port with
3072
3072
<a class="link" href="GSocket.html#g-socket-bind" title="g_socket_bind ()"><code class="function">g_socket_bind()</code></a>.</p>
3073
3073
<p>If <em class="parameter"><code>iface</code></em>
3074
 
 is <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the system will automatically pick an interface
 
3074
 is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the system will automatically pick an interface
3075
3075
to bind to based on <em class="parameter"><code>group</code></em>
3076
3076
.</p>
3077
3077
<p>If <em class="parameter"><code>source_specific</code></em>
3078
 
 is <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, source-specific multicast as defined
 
3078
 is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, source-specific multicast as defined
3079
3079
in RFC 4604 is used. Note that on older platforms this may fail
3080
3080
with a <a class="link" href="gio-GIOError.html#G-IO-ERROR-NOT-SUPPORTED:CAPS"><code class="literal">G_IO_ERROR_NOT_SUPPORTED</code></a> error.</p>
3081
3081
<div class="refsect3">
3099
3099
</tr>
3100
3100
<tr>
3101
3101
<td class="parameter_name"><p>iface</p></td>
3102
 
<td class="parameter_description"><p> Name of the interface to use, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
 
3102
<td class="parameter_description"><p> Name of the interface to use, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
3103
3103
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
3104
3104
</tr>
3105
3105
<tr>
3106
3106
<td class="parameter_name"><p>source_specific</p></td>
3107
 
<td class="parameter_description"><p><a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if source-specific multicast should be used</p></td>
 
3107
<td class="parameter_description"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if source-specific multicast should be used</p></td>
3108
3108
<td class="parameter_annotations"> </td>
3109
3109
</tr>
3110
3110
<tr>
3111
3111
<td class="parameter_name"><p>error</p></td>
3112
 
<td class="parameter_description"><p><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
 
3112
<td class="parameter_description"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
3113
3113
<td class="parameter_annotations"> </td>
3114
3114
</tr>
3115
3115
</tbody>
3117
3117
</div>
3118
3118
<div class="refsect3">
3119
3119
<a name="id-1.4.13.2.10.49.8"></a><h4>Returns</h4>
3120
 
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on error.</p>
 
3120
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on error.</p>
3121
3121
<p></p>
3122
3122
</div>
3123
3123
<p class="since">Since 2.32</p>
3125
3125
<hr>
3126
3126
<div class="refsect2">
3127
3127
<a name="g-socket-leave-multicast-group"></a><h3>g_socket_leave_multicast_group ()</h3>
3128
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
3128
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
3129
3129
g_socket_leave_multicast_group (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>,
3130
3130
                                <em class="parameter"><code><a class="link" href="GInetAddress.html" title="GInetAddress"><span class="type">GInetAddress</span></a> *group</code></em>,
3131
 
                                <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> source_specific</code></em>,
3132
 
                                <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *iface</code></em>,
3133
 
                                <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
3131
                                <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> source_specific</code></em>,
 
3132
                                <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *iface</code></em>,
 
3133
                                <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
3134
3134
<p>Removes <em class="parameter"><code>socket</code></em>
3135
3135
 from the multicast group defined by <em class="parameter"><code>group</code></em>
3136
3136
, <em class="parameter"><code>iface</code></em>
3167
3167
</tr>
3168
3168
<tr>
3169
3169
<td class="parameter_name"><p>source_specific</p></td>
3170
 
<td class="parameter_description"><p><a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if source-specific multicast was used</p></td>
 
3170
<td class="parameter_description"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if source-specific multicast was used</p></td>
3171
3171
<td class="parameter_annotations"> </td>
3172
3172
</tr>
3173
3173
<tr>
3174
3174
<td class="parameter_name"><p>error</p></td>
3175
 
<td class="parameter_description"><p><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
 
3175
<td class="parameter_description"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
3176
3176
<td class="parameter_annotations"> </td>
3177
3177
</tr>
3178
3178
</tbody>
3180
3180
</div>
3181
3181
<div class="refsect3">
3182
3182
<a name="id-1.4.13.2.10.50.7"></a><h4>Returns</h4>
3183
 
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on error.</p>
 
3183
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on error.</p>
3184
3184
<p></p>
3185
3185
</div>
3186
3186
<p class="since">Since 2.32</p>
3188
3188
<hr>
3189
3189
<div class="refsect2">
3190
3190
<a name="g-socket-get-multicast-loopback"></a><h3>g_socket_get_multicast_loopback ()</h3>
3191
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
3191
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
3192
3192
g_socket_get_multicast_loopback (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>);</pre>
3193
3193
<p>Gets the multicast loopback setting on <em class="parameter"><code>socket</code></em>
3194
 
; if <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> (the
 
3194
; if <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> (the
3195
3195
default), outgoing multicast packets will be looped back to
3196
3196
multicast listeners on the same host.</p>
3197
3197
<div class="refsect3">
3222
3222
<a name="g-socket-set-multicast-loopback"></a><h3>g_socket_set_multicast_loopback ()</h3>
3223
3223
<pre class="programlisting"><span class="returnvalue">void</span>
3224
3224
g_socket_set_multicast_loopback (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>,
3225
 
                                 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> loopback</code></em>);</pre>
 
3225
                                 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> loopback</code></em>);</pre>
3226
3226
<p>Sets whether outgoing multicast packets will be received by sockets
3227
 
listening on that multicast address on the same host. This is <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>
 
3227
listening on that multicast address on the same host. This is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>
3228
3228
by default.</p>
3229
3229
<div class="refsect3">
3230
3230
<a name="id-1.4.13.2.10.52.5"></a><h4>Parameters</h4>
3255
3255
<hr>
3256
3256
<div class="refsect2">
3257
3257
<a name="g-socket-get-multicast-ttl"></a><h3>g_socket_get_multicast_ttl ()</h3>
3258
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
 
3258
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
3259
3259
g_socket_get_multicast_ttl (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>);</pre>
3260
3260
<p>Gets the multicast time-to-live setting on <em class="parameter"><code>socket</code></em>
3261
3261
; see
3288
3288
<a name="g-socket-set-multicast-ttl"></a><h3>g_socket_set_multicast_ttl ()</h3>
3289
3289
<pre class="programlisting"><span class="returnvalue">void</span>
3290
3290
g_socket_set_multicast_ttl (<em class="parameter"><code><a class="link" href="GSocket.html" title="GSocket"><span class="type">GSocket</span></a> *socket</code></em>,
3291
 
                            <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> ttl</code></em>);</pre>
 
3291
                            <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> ttl</code></em>);</pre>
3292
3292
<p>Sets the time-to-live for outgoing multicast datagrams on <em class="parameter"><code>socket</code></em>
3293
3293
.
3294
3294
By default, this is 1, meaning that multicast packets will not leave
3508
3508
</colgroup>
3509
3509
<tbody>
3510
3510
<tr>
3511
 
<td class="struct_member_name"><p><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> <em class="structfield"><code><a name="GInputVector.buffer"></a>buffer</code></em>;</p></td>
 
3511
<td class="struct_member_name"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> <em class="structfield"><code><a name="GInputVector.buffer"></a>buffer</code></em>;</p></td>
3512
3512
<td class="struct_member_description"><p>Pointer to a buffer where data will be written.</p></td>
3513
3513
<td class="struct_member_annotations"> </td>
3514
3514
</tr>
3515
3515
<tr>
3516
 
<td class="struct_member_name"><p><a href="../glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> <em class="structfield"><code><a name="GInputVector.size"></a>size</code></em>;</p></td>
 
3516
<td class="struct_member_name"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> <em class="structfield"><code><a name="GInputVector.size"></a>size</code></em>;</p></td>
3517
3517
<td class="struct_member_description"><p>the available size in <em class="parameter"><code>buffer</code></em>
3518
3518
.</p></td>
3519
3519
<td class="struct_member_annotations"> </td>
3545
3545
</colgroup>
3546
3546
<tbody>
3547
3547
<tr>
3548
 
<td class="struct_member_name"><p><a href="../glib/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> <em class="structfield"><code><a name="GOutputVector.buffer"></a>buffer</code></em>;</p></td>
 
3548
<td class="struct_member_name"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> <em class="structfield"><code><a name="GOutputVector.buffer"></a>buffer</code></em>;</p></td>
3549
3549
<td class="struct_member_description"><p>Pointer to a buffer of data to read.</p></td>
3550
3550
<td class="struct_member_annotations"> </td>
3551
3551
</tr>
3552
3552
<tr>
3553
 
<td class="struct_member_name"><p><a href="../glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> <em class="structfield"><code><a name="GOutputVector.size"></a>size</code></em>;</p></td>
 
3553
<td class="struct_member_name"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> <em class="structfield"><code><a name="GOutputVector.size"></a>size</code></em>;</p></td>
3554
3554
<td class="struct_member_description"><p>the size of <em class="parameter"><code>buffer</code></em>
3555
3555
.</p></td>
3556
3556
<td class="struct_member_annotations"> </td>
3565
3565
<a name="GSocket.property-details"></a><h2>Property Details</h2>
3566
3566
<div class="refsect2">
3567
3567
<a name="GSocket--blocking"></a><h3>The <code class="literal">“blocking”</code> property</h3>
3568
 
<pre class="programlisting">  “blocking”                 <a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
 
3568
<pre class="programlisting">  “blocking”                 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
3569
3569
<p>Whether or not I/O on this socket is blocking.</p>
3570
3570
<p>Flags: Read / Write</p>
3571
3571
<p>Default value: TRUE</p>
3573
3573
<hr>
3574
3574
<div class="refsect2">
3575
3575
<a name="GSocket--broadcast"></a><h3>The <code class="literal">“broadcast”</code> property</h3>
3576
 
<pre class="programlisting">  “broadcast”                <a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
 
3576
<pre class="programlisting">  “broadcast”                <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
3577
3577
<p>Whether the socket should allow sending to broadcast addresses.</p>
3578
3578
<p>Flags: Read / Write</p>
3579
3579
<p>Default value: FALSE</p>
3590
3590
<hr>
3591
3591
<div class="refsect2">
3592
3592
<a name="GSocket--fd"></a><h3>The <code class="literal">“fd”</code> property</h3>
3593
 
<pre class="programlisting">  “fd”                       <a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
 
3593
<pre class="programlisting">  “fd”                       <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
3594
3594
<p>The sockets file descriptor.</p>
3595
3595
<p>Flags: Read / Write / Construct Only</p>
3596
3596
<p>Default value: -1</p>
3598
3598
<hr>
3599
3599
<div class="refsect2">
3600
3600
<a name="GSocket--keepalive"></a><h3>The <code class="literal">“keepalive”</code> property</h3>
3601
 
<pre class="programlisting">  “keepalive”                <a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
 
3601
<pre class="programlisting">  “keepalive”                <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
3602
3602
<p>Keep connection alive by sending periodic pings.</p>
3603
3603
<p>Flags: Read / Write</p>
3604
3604
<p>Default value: FALSE</p>
3606
3606
<hr>
3607
3607
<div class="refsect2">
3608
3608
<a name="GSocket--listen-backlog"></a><h3>The <code class="literal">“listen-backlog”</code> property</h3>
3609
 
<pre class="programlisting">  “listen-backlog”           <a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
 
3609
<pre class="programlisting">  “listen-backlog”           <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
3610
3610
<p>Outstanding connections in the listen queue.</p>
3611
3611
<p>Flags: Read / Write</p>
3612
3612
<p>Allowed values: [0,128]</p>
3622
3622
<hr>
3623
3623
<div class="refsect2">
3624
3624
<a name="GSocket--multicast-loopback"></a><h3>The <code class="literal">“multicast-loopback”</code> property</h3>
3625
 
<pre class="programlisting">  “multicast-loopback”       <a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
 
3625
<pre class="programlisting">  “multicast-loopback”       <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
3626
3626
<p>Whether outgoing multicast packets loop back to the local host.</p>
3627
3627
<p>Flags: Read / Write</p>
3628
3628
<p>Default value: TRUE</p>
3631
3631
<hr>
3632
3632
<div class="refsect2">
3633
3633
<a name="GSocket--multicast-ttl"></a><h3>The <code class="literal">“multicast-ttl”</code> property</h3>
3634
 
<pre class="programlisting">  “multicast-ttl”            <a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
 
3634
<pre class="programlisting">  “multicast-ttl”            <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
3635
3635
<p>Time-to-live out outgoing multicast packets</p>
3636
3636
<p>Flags: Read / Write</p>
3637
3637
<p>Default value: 1</p>
3655
3655
<hr>
3656
3656
<div class="refsect2">
3657
3657
<a name="GSocket--timeout"></a><h3>The <code class="literal">“timeout”</code> property</h3>
3658
 
<pre class="programlisting">  “timeout”                  <a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
 
3658
<pre class="programlisting">  “timeout”                  <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
3659
3659
<p>The timeout in seconds on socket I/O</p>
3660
3660
<p>Flags: Read / Write</p>
3661
3661
<p>Default value: 0</p>
3664
3664
<hr>
3665
3665
<div class="refsect2">
3666
3666
<a name="GSocket--ttl"></a><h3>The <code class="literal">“ttl”</code> property</h3>
3667
 
<pre class="programlisting">  “ttl”                      <a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
 
3667
<pre class="programlisting">  “ttl”                      <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
3668
3668
<p>Time-to-live for outgoing unicast packets</p>
3669
3669
<p>Flags: Read / Write</p>
3670
3670
<p>Default value: 0</p>