Imported Upstream version 0.1.16
[platform/upstream/libnice.git] / docs / reference / libnice / html / libnice-Pseudo-TCP-Socket.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>Pseudo TCP Socket: libnice Reference Manual</title>
6 <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
7 <link rel="home" href="index.html" title="libnice Reference Manual">
8 <link rel="up" href="ch05.html" title="">
9 <link rel="prev" href="ch05.html" title="">
10 <link rel="next" href="pt04.html" title="Part IV. Appendices">
11 <meta name="generator" content="GTK-Doc V1.29 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
16 <td width="100%" align="left" class="shortcuts">
17 <a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
18                   <a href="#libnice-Pseudo-TCP-Socket.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
19                   <a href="#libnice-Pseudo-TCP-Socket.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span> 
20                   <a href="#libnice-Pseudo-TCP-Socket.properties" class="shortcut">Properties</a></span>
21 </td>
22 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
23 <td><a accesskey="u" href="ch05.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
24 <td><a accesskey="p" href="ch05.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
25 <td><a accesskey="n" href="pt04.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
26 </tr></table>
27 <div class="refentry">
28 <a name="libnice-Pseudo-TCP-Socket"></a><div class="titlepage"></div>
29 <div class="refnamediv"><table width="100%"><tr>
30 <td valign="top">
31 <h2><span class="refentrytitle"><a name="libnice-Pseudo-TCP-Socket.top_of_page"></a>Pseudo TCP Socket</span></h2>
32 <p>Pseudo TCP Socket — Pseudo TCP implementation</p>
33 </td>
34 <td class="gallery_image" valign="top" align="right"></td>
35 </tr></table></div>
36 <div class="refsect1">
37 <a name="libnice-Pseudo-TCP-Socket.stability-level"></a><h2>Stability Level</h2>
38 <acronym title="The intention of a Stable interface is to enable arbitrary third parties to
39 develop applications to these interfaces, release them, and have confidence that
40 they will run on all minor releases of the product (after the one in which the
41 interface was introduced, and within the same major release). Even at a major
42 release, incompatible changes are expected to be rare, and to have strong
43 justifications.
44 "><span class="acronym">Stable</span></acronym>, unless otherwise indicated
45 </div>
46 <div class="refsect1">
47 <a name="libnice-Pseudo-TCP-Socket.functions"></a><h2>Functions</h2>
48 <div class="informaltable"><table class="informaltable" width="100%" border="0">
49 <colgroup>
50 <col width="150px" class="functions_return">
51 <col class="functions_name">
52 </colgroup>
53 <tbody>
54 <tr>
55 <td class="function_type">
56 <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="returnvalue">PseudoTcpSocket</span></a> *
57 </td>
58 <td class="function_name">
59 <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-new" title="pseudo_tcp_socket_new ()">pseudo_tcp_socket_new</a> <span class="c_punctuation">()</span>
60 </td>
61 </tr>
62 <tr>
63 <td class="function_type">
64 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
65 </td>
66 <td class="function_name">
67 <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-connect" title="pseudo_tcp_socket_connect ()">pseudo_tcp_socket_connect</a> <span class="c_punctuation">()</span>
68 </td>
69 </tr>
70 <tr>
71 <td class="function_type">
72 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
73 </td>
74 <td class="function_name">
75 <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-recv" title="pseudo_tcp_socket_recv ()">pseudo_tcp_socket_recv</a> <span class="c_punctuation">()</span>
76 </td>
77 </tr>
78 <tr>
79 <td class="function_type">
80 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
81 </td>
82 <td class="function_name">
83 <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-send" title="pseudo_tcp_socket_send ()">pseudo_tcp_socket_send</a> <span class="c_punctuation">()</span>
84 </td>
85 </tr>
86 <tr>
87 <td class="function_type">
88 <span class="returnvalue">void</span>
89 </td>
90 <td class="function_name">
91 <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-close" title="pseudo_tcp_socket_close ()">pseudo_tcp_socket_close</a> <span class="c_punctuation">()</span>
92 </td>
93 </tr>
94 <tr>
95 <td class="function_type">
96 <span class="returnvalue">void</span>
97 </td>
98 <td class="function_name">
99 <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-shutdown" title="pseudo_tcp_socket_shutdown ()">pseudo_tcp_socket_shutdown</a> <span class="c_punctuation">()</span>
100 </td>
101 </tr>
102 <tr>
103 <td class="function_type">
104 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
105 </td>
106 <td class="function_name">
107 <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-is-closed" title="pseudo_tcp_socket_is_closed ()">pseudo_tcp_socket_is_closed</a> <span class="c_punctuation">()</span>
108 </td>
109 </tr>
110 <tr>
111 <td class="function_type">
112 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
113 </td>
114 <td class="function_name">
115 <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-is-closed-remotely" title="pseudo_tcp_socket_is_closed_remotely ()">pseudo_tcp_socket_is_closed_remotely</a> <span class="c_punctuation">()</span>
116 </td>
117 </tr>
118 <tr>
119 <td class="function_type">
120 <span class="returnvalue">int</span>
121 </td>
122 <td class="function_name">
123 <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-get-error" title="pseudo_tcp_socket_get_error ()">pseudo_tcp_socket_get_error</a> <span class="c_punctuation">()</span>
124 </td>
125 </tr>
126 <tr>
127 <td class="function_type">
128 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
129 </td>
130 <td class="function_name">
131 <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-get-next-clock" title="pseudo_tcp_socket_get_next_clock ()">pseudo_tcp_socket_get_next_clock</a> <span class="c_punctuation">()</span>
132 </td>
133 </tr>
134 <tr>
135 <td class="function_type">
136 <span class="returnvalue">void</span>
137 </td>
138 <td class="function_name">
139 <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-notify-clock" title="pseudo_tcp_socket_notify_clock ()">pseudo_tcp_socket_notify_clock</a> <span class="c_punctuation">()</span>
140 </td>
141 </tr>
142 <tr>
143 <td class="function_type">
144 <span class="returnvalue">void</span>
145 </td>
146 <td class="function_name">
147 <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-notify-mtu" title="pseudo_tcp_socket_notify_mtu ()">pseudo_tcp_socket_notify_mtu</a> <span class="c_punctuation">()</span>
148 </td>
149 </tr>
150 <tr>
151 <td class="function_type">
152 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
153 </td>
154 <td class="function_name">
155 <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-notify-packet" title="pseudo_tcp_socket_notify_packet ()">pseudo_tcp_socket_notify_packet</a> <span class="c_punctuation">()</span>
156 </td>
157 </tr>
158 <tr>
159 <td class="function_type">
160 <span class="returnvalue">void</span>
161 </td>
162 <td class="function_name">
163 <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-set-debug-level" title="pseudo_tcp_set_debug_level ()">pseudo_tcp_set_debug_level</a> <span class="c_punctuation">()</span>
164 </td>
165 </tr>
166 <tr>
167 <td class="function_type">
168 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
169 </td>
170 <td class="function_name">
171 <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-get-available-bytes" title="pseudo_tcp_socket_get_available_bytes ()">pseudo_tcp_socket_get_available_bytes</a> <span class="c_punctuation">()</span>
172 </td>
173 </tr>
174 <tr>
175 <td class="function_type">
176 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
177 </td>
178 <td class="function_name">
179 <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-can-send" title="pseudo_tcp_socket_can_send ()">pseudo_tcp_socket_can_send</a> <span class="c_punctuation">()</span>
180 </td>
181 </tr>
182 <tr>
183 <td class="function_type">
184 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"><span class="returnvalue">gsize</span></a>
185 </td>
186 <td class="function_name">
187 <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-get-available-send-space" title="pseudo_tcp_socket_get_available_send_space ()">pseudo_tcp_socket_get_available_send_space</a> <span class="c_punctuation">()</span>
188 </td>
189 </tr>
190 <tr>
191 <td class="function_type">
192 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
193 </td>
194 <td class="function_name">
195 <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-notify-message" title="pseudo_tcp_socket_notify_message ()">pseudo_tcp_socket_notify_message</a> <span class="c_punctuation">()</span>
196 </td>
197 </tr>
198 <tr>
199 <td class="function_type">
200 <span class="returnvalue">void</span>
201 </td>
202 <td class="function_name">
203 <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-set-time" title="pseudo_tcp_socket_set_time ()">pseudo_tcp_socket_set_time</a> <span class="c_punctuation">()</span>
204 </td>
205 </tr>
206 </tbody>
207 </table></div>
208 </div>
209 <div class="refsect1">
210 <a name="libnice-Pseudo-TCP-Socket.properties"></a><h2>Properties</h2>
211 <div class="informaltable"><table class="informaltable" border="0">
212 <colgroup>
213 <col width="150px" class="properties_type">
214 <col width="300px" class="properties_name">
215 <col width="200px" class="properties_flags">
216 </colgroup>
217 <tbody>
218 <tr>
219 <td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
220 <td class="property_name"><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket--ack-delay" title="The “ack-delay” property">ack-delay</a></td>
221 <td class="property_flags">Read / Write</td>
222 </tr>
223 <tr>
224 <td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a></td>
225 <td class="property_name"><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket--callbacks" title="The “callbacks” property">callbacks</a></td>
226 <td class="property_flags">Read / Write</td>
227 </tr>
228 <tr>
229 <td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
230 <td class="property_name"><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket--conversation" title="The “conversation” property">conversation</a></td>
231 <td class="property_flags">Read / Write / Construct Only</td>
232 </tr>
233 <tr>
234 <td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
235 <td class="property_name"><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket--no-delay" title="The “no-delay” property">no-delay</a></td>
236 <td class="property_flags">Read / Write</td>
237 </tr>
238 <tr>
239 <td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
240 <td class="property_name"><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket--rcv-buf" title="The “rcv-buf” property">rcv-buf</a></td>
241 <td class="property_flags">Read / Write</td>
242 </tr>
243 <tr>
244 <td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
245 <td class="property_name"><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket--snd-buf" title="The “snd-buf” property">snd-buf</a></td>
246 <td class="property_flags">Read / Write</td>
247 </tr>
248 <tr>
249 <td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
250 <td class="property_name"><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket--state" title="The “state” property">state</a></td>
251 <td class="property_flags">Read</td>
252 </tr>
253 <tr>
254 <td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
255 <td class="property_name"><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket--support-fin-ack" title="The “support-fin-ack” property">support-fin-ack</a></td>
256 <td class="property_flags">Read / Write / Construct Only</td>
257 </tr>
258 </tbody>
259 </table></div>
260 </div>
261 <a name="PseudoTcpSocket"></a><div class="refsect1">
262 <a name="libnice-Pseudo-TCP-Socket.other"></a><h2>Types and Values</h2>
263 <div class="informaltable"><table class="informaltable" width="100%" border="0">
264 <colgroup>
265 <col width="150px" class="name">
266 <col class="description">
267 </colgroup>
268 <tbody>
269 <tr>
270 <td class="datatype_keyword"> </td>
271 <td class="function_name"><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket-struct" title="PseudoTcpSocket">PseudoTcpSocket</a></td>
272 </tr>
273 <tr>
274 <td class="datatype_keyword">enum</td>
275 <td class="function_name"><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpState" title="enum PseudoTcpState">PseudoTcpState</a></td>
276 </tr>
277 <tr>
278 <td class="datatype_keyword">enum</td>
279 <td class="function_name"><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpWriteResult" title="enum PseudoTcpWriteResult">PseudoTcpWriteResult</a></td>
280 </tr>
281 <tr>
282 <td class="datatype_keyword"> </td>
283 <td class="function_name"><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpCallbacks" title="PseudoTcpCallbacks">PseudoTcpCallbacks</a></td>
284 </tr>
285 <tr>
286 <td class="datatype_keyword">enum</td>
287 <td class="function_name"><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpDebugLevel" title="enum PseudoTcpDebugLevel">PseudoTcpDebugLevel</a></td>
288 </tr>
289 <tr>
290 <td class="datatype_keyword">enum</td>
291 <td class="function_name"><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpShutdown" title="enum PseudoTcpShutdown">PseudoTcpShutdown</a></td>
292 </tr>
293 </tbody>
294 </table></div>
295 </div>
296 <div class="refsect1">
297 <a name="libnice-Pseudo-TCP-Socket.object-hierarchy"></a><h2>Object Hierarchy</h2>
298 <pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/gobject-Enumeration-and-Flag-Types.html">GEnum</a>
299     <span class="lineart">├──</span> PseudoTcpDebugLevel
300     <span class="lineart">├──</span> PseudoTcpShutdown
301     <span class="lineart">├──</span> PseudoTcpState
302     <span class="lineart">╰──</span> PseudoTcpWriteResult
303     <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
304     <span class="lineart">╰──</span> PseudoTcpSocket
305 </pre>
306 </div>
307 <div class="refsect1">
308 <a name="libnice-Pseudo-TCP-Socket.includes"></a><h2>Includes</h2>
309 <pre class="synopsis">#include &lt;pseudotcp.h&gt;
310 </pre>
311 </div>
312 <div class="refsect1">
313 <a name="libnice-Pseudo-TCP-Socket.description"></a><h2>Description</h2>
314 <p>The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> is an object implementing a Pseudo Tcp Socket for use
315 over UDP.
316 The socket will implement a subset of the TCP stack to allow for a reliable
317 transport over non-reliable sockets (such as UDP).</p>
318 <p>See the file tests/test-pseudotcp.c in the source package for an example
319 of how to use the object.</p>
320 </div>
321 <div class="refsect1">
322 <a name="libnice-Pseudo-TCP-Socket.functions_details"></a><h2>Functions</h2>
323 <div class="refsect2">
324 <a name="pseudo-tcp-socket-new"></a><h3>pseudo_tcp_socket_new ()</h3>
325 <pre class="programlisting"><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="returnvalue">PseudoTcpSocket</span></a> *
326 pseudo_tcp_socket_new (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> conversation</code></em>,
327                        <em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpCallbacks" title="PseudoTcpCallbacks"><span class="type">PseudoTcpCallbacks</span></a> *callbacks</code></em>);</pre>
328 <p>Creates a new <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> for the specified conversation</p>
329 <div class="note">
330 <p>
331      The <em class="parameter"><code>callbacks</code></em> must be non-NULL, in order to get notified of packets the
332      socket needs to send.
333    </p>
334 <p>
335      If the <em class="parameter"><code>callbacks</code></em> structure was dynamicly allocated, it can be freed
336      after the call <em class="parameter"><code>pseudo_tcp_socket_new</code></em>
337    </p>
338 </div>
339 <div class="refsect3">
340 <a name="pseudo-tcp-socket-new.parameters"></a><h4>Parameters</h4>
341 <div class="informaltable"><table class="informaltable" width="100%" border="0">
342 <colgroup>
343 <col width="150px" class="parameters_name">
344 <col class="parameters_description">
345 <col width="200px" class="parameters_annotations">
346 </colgroup>
347 <tbody>
348 <tr>
349 <td class="parameter_name"><p>conversation</p></td>
350 <td class="parameter_description"><p>The conversation id for the socket.</p></td>
351 <td class="parameter_annotations"> </td>
352 </tr>
353 <tr>
354 <td class="parameter_name"><p>callbacks</p></td>
355 <td class="parameter_description"><p>A pointer to the <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpCallbacks" title="PseudoTcpCallbacks"><span class="type">PseudoTcpCallbacks</span></a> structure for getting
356 notified of the <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> events.</p></td>
357 <td class="parameter_annotations"> </td>
358 </tr>
359 </tbody>
360 </table></div>
361 </div>
362 <div class="refsect3">
363 <a name="pseudo-tcp-socket-new.returns"></a><h4>Returns</h4>
364 <p> The new <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> object, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error</p>
365 </div>
366 <p class="since">Since: <a class="link" href="ix08.html#api-index-0.0.11">0.0.11</a></p>
367 </div>
368 <hr>
369 <div class="refsect2">
370 <a name="pseudo-tcp-socket-connect"></a><h3>pseudo_tcp_socket_connect ()</h3>
371 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
372 pseudo_tcp_socket_connect (<em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> *self</code></em>);</pre>
373 <p>Connects the <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> to the peer with the same conversation id.
374 The connection will only be successful after the
375 <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpCallbacks" title="PseudoTcpCallbacks"><code class="literal">PseudoTcpCallbacks</code></a>:PseudoTcpOpened callback is called</p>
376 <div class="refsect3">
377 <a name="pseudo-tcp-socket-connect.parameters"></a><h4>Parameters</h4>
378 <div class="informaltable"><table class="informaltable" width="100%" border="0">
379 <colgroup>
380 <col width="150px" class="parameters_name">
381 <col class="parameters_description">
382 <col width="200px" class="parameters_annotations">
383 </colgroup>
384 <tbody><tr>
385 <td class="parameter_name"><p>self</p></td>
386 <td class="parameter_description"><p>The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> object.</p></td>
387 <td class="parameter_annotations"> </td>
388 </tr></tbody>
389 </table></div>
390 </div>
391 <div class="refsect3">
392 <a name="pseudo-tcp-socket-connect.returns"></a><h4>Returns</h4>
393 <p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on failure (not in <a href="/usr/share/gtk-doc/html/libnice/libnice-Pseudo-TCP-Socket.html#TCP-LISTEN:CAPS"><code class="literal">TCP_LISTEN</code></a> state)</p>
394 <p> See also: <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-get-error" title="pseudo_tcp_socket_get_error ()"><code class="function">pseudo_tcp_socket_get_error()</code></a> </p>
395 </div>
396 <p class="since">Since: <a class="link" href="ix08.html#api-index-0.0.11">0.0.11</a></p>
397 </div>
398 <hr>
399 <div class="refsect2">
400 <a name="pseudo-tcp-socket-recv"></a><h3>pseudo_tcp_socket_recv ()</h3>
401 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
402 pseudo_tcp_socket_recv (<em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> *self</code></em>,
403                         <em class="parameter"><code><span class="type">char</span> *buffer</code></em>,
404                         <em class="parameter"><code><span class="type">size_t</span> len</code></em>);</pre>
405 <p>Receive data from the socket.</p>
406 <div class="note">
407 <p>
408      Only call this on the <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpCallbacks" title="PseudoTcpCallbacks"><code class="literal">PseudoTcpCallbacks</code></a>:PseudoTcpReadable callback.
409    </p>
410 <p>
411      This function should be called in a loop. If this function does not
412      return -1 with EWOULDBLOCK as the error, the
413      <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpCallbacks" title="PseudoTcpCallbacks"><code class="literal">PseudoTcpCallbacks</code></a>:PseudoTcpReadable callback will not be called again.
414    </p>
415 </div>
416 <div class="refsect3">
417 <a name="pseudo-tcp-socket-recv.parameters"></a><h4>Parameters</h4>
418 <div class="informaltable"><table class="informaltable" width="100%" border="0">
419 <colgroup>
420 <col width="150px" class="parameters_name">
421 <col class="parameters_description">
422 <col width="200px" class="parameters_annotations">
423 </colgroup>
424 <tbody>
425 <tr>
426 <td class="parameter_name"><p>self</p></td>
427 <td class="parameter_description"><p>The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> object.</p></td>
428 <td class="parameter_annotations"> </td>
429 </tr>
430 <tr>
431 <td class="parameter_name"><p>buffer</p></td>
432 <td class="parameter_description"><p>The buffer to fill with received data</p></td>
433 <td class="parameter_annotations"> </td>
434 </tr>
435 <tr>
436 <td class="parameter_name"><p>len</p></td>
437 <td class="parameter_description"><p>The length of <em class="parameter"><code>buffer</code></em>
438 </p></td>
439 <td class="parameter_annotations"> </td>
440 </tr>
441 </tbody>
442 </table></div>
443 </div>
444 <div class="refsect3">
445 <a name="pseudo-tcp-socket-recv.returns"></a><h4>Returns</h4>
446 <p> The number of bytes received or -1 in case of error</p>
447 <p> See also: <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-get-error" title="pseudo_tcp_socket_get_error ()"><code class="function">pseudo_tcp_socket_get_error()</code></a> </p>
448 </div>
449 <p class="since">Since: <a class="link" href="ix08.html#api-index-0.0.11">0.0.11</a></p>
450 </div>
451 <hr>
452 <div class="refsect2">
453 <a name="pseudo-tcp-socket-send"></a><h3>pseudo_tcp_socket_send ()</h3>
454 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
455 pseudo_tcp_socket_send (<em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> *self</code></em>,
456                         <em class="parameter"><code>const <span class="type">char</span> *buffer</code></em>,
457                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> len</code></em>);</pre>
458 <p>Send data on the socket.</p>
459 <div class="note"><p>
460      If this function return -1 with EWOULDBLOCK as the error, or if the return
461      value is lower than <em class="parameter"><code>len</code></em>, then the <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpCallbacks" title="PseudoTcpCallbacks"><code class="literal">PseudoTcpCallbacks</code></a>:PseudoTcpWritable
462      callback will be called when the socket will become writable.
463    </p></div>
464 <div class="refsect3">
465 <a name="pseudo-tcp-socket-send.parameters"></a><h4>Parameters</h4>
466 <div class="informaltable"><table class="informaltable" width="100%" border="0">
467 <colgroup>
468 <col width="150px" class="parameters_name">
469 <col class="parameters_description">
470 <col width="200px" class="parameters_annotations">
471 </colgroup>
472 <tbody>
473 <tr>
474 <td class="parameter_name"><p>self</p></td>
475 <td class="parameter_description"><p>The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> object.</p></td>
476 <td class="parameter_annotations"> </td>
477 </tr>
478 <tr>
479 <td class="parameter_name"><p>buffer</p></td>
480 <td class="parameter_description"><p>The buffer with data to send</p></td>
481 <td class="parameter_annotations"> </td>
482 </tr>
483 <tr>
484 <td class="parameter_name"><p>len</p></td>
485 <td class="parameter_description"><p>The length of <em class="parameter"><code>buffer</code></em>
486 </p></td>
487 <td class="parameter_annotations"> </td>
488 </tr>
489 </tbody>
490 </table></div>
491 </div>
492 <div class="refsect3">
493 <a name="pseudo-tcp-socket-send.returns"></a><h4>Returns</h4>
494 <p> The number of bytes sent or -1 in case of error</p>
495 <p> See also: <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-get-error" title="pseudo_tcp_socket_get_error ()"><code class="function">pseudo_tcp_socket_get_error()</code></a> </p>
496 </div>
497 <p class="since">Since: <a class="link" href="ix08.html#api-index-0.0.11">0.0.11</a></p>
498 </div>
499 <hr>
500 <div class="refsect2">
501 <a name="pseudo-tcp-socket-close"></a><h3>pseudo_tcp_socket_close ()</h3>
502 <pre class="programlisting"><span class="returnvalue">void</span>
503 pseudo_tcp_socket_close (<em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> *self</code></em>,
504                          <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> force</code></em>);</pre>
505 <p>Close the socket for sending. If <em class="parameter"><code>force</code></em>
506  is set to <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, the socket will
507 finish sending pending data before closing. If it is set to <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, the socket
508 will discard pending data and close the connection immediately (sending a TCP
509 RST segment).</p>
510 <p>The socket will be closed in both directions – sending and receiving – and
511 any pending received data must be read before calling this function, by
512 calling <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-recv" title="pseudo_tcp_socket_recv ()"><code class="function">pseudo_tcp_socket_recv()</code></a> until it blocks. If any pending data is in
513 the receive buffer when <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-close" title="pseudo_tcp_socket_close ()"><code class="function">pseudo_tcp_socket_close()</code></a> is called, a TCP RST
514 segment will be sent to the peer to notify it of the data loss.</p>
515 <div class="note"><p>
516      The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpCallbacks" title="PseudoTcpCallbacks"><code class="literal">PseudoTcpCallbacks</code></a>:PseudoTcpClosed callback will not be called once
517      the socket gets closed. It is only used for aborted connection.
518      Instead, the socket gets closed when the <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-get-next-clock" title="pseudo_tcp_socket_get_next_clock ()"><code class="function">pseudo_tcp_socket_get_next_clock()</code></a>
519      function returns FALSE.
520    </p></div>
521 <p> See also: <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-get-next-clock" title="pseudo_tcp_socket_get_next_clock ()"><code class="function">pseudo_tcp_socket_get_next_clock()</code></a> </p>
522 <div class="refsect3">
523 <a name="pseudo-tcp-socket-close.parameters"></a><h4>Parameters</h4>
524 <div class="informaltable"><table class="informaltable" width="100%" border="0">
525 <colgroup>
526 <col width="150px" class="parameters_name">
527 <col class="parameters_description">
528 <col width="200px" class="parameters_annotations">
529 </colgroup>
530 <tbody>
531 <tr>
532 <td class="parameter_name"><p>self</p></td>
533 <td class="parameter_description"><p>The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> object.</p></td>
534 <td class="parameter_annotations"> </td>
535 </tr>
536 <tr>
537 <td class="parameter_name"><p>force</p></td>
538 <td class="parameter_description"><p><a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to close the socket forcefully, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> to close it gracefully</p></td>
539 <td class="parameter_annotations"> </td>
540 </tr>
541 </tbody>
542 </table></div>
543 </div>
544 <p class="since">Since: <a class="link" href="ix08.html#api-index-0.0.11">0.0.11</a></p>
545 </div>
546 <hr>
547 <div class="refsect2">
548 <a name="pseudo-tcp-socket-shutdown"></a><h3>pseudo_tcp_socket_shutdown ()</h3>
549 <pre class="programlisting"><span class="returnvalue">void</span>
550 pseudo_tcp_socket_shutdown (<em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> *self</code></em>,
551                             <em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpShutdown" title="enum PseudoTcpShutdown"><span class="type">PseudoTcpShutdown</span></a> how</code></em>);</pre>
552 <p>Shut down sending, receiving, or both on the socket, depending on the value
553 of <em class="parameter"><code>how</code></em>
554 . The behaviour of <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-send" title="pseudo_tcp_socket_send ()"><code class="function">pseudo_tcp_socket_send()</code></a> and
555 <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-recv" title="pseudo_tcp_socket_recv ()"><code class="function">pseudo_tcp_socket_recv()</code></a> will immediately change after this function returns
556 (depending on the value of <em class="parameter"><code>how</code></em>
557 ), though the socket may continue to process
558 network traffic in the background even if sending or receiving data is
559 forbidden.</p>
560 <p>This is equivalent to the POSIX <code class="function">shutdown()</code> function. Setting <em class="parameter"><code>how</code></em>
561  to
562 <a class="link" href="libnice-Pseudo-TCP-Socket.html#PSEUDO-TCP-SHUTDOWN-RDWR:CAPS"><code class="literal">PSEUDO_TCP_SHUTDOWN_RDWR</code></a> is equivalent to calling <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-close" title="pseudo_tcp_socket_close ()"><code class="function">pseudo_tcp_socket_close()</code></a>.</p>
563 <div class="refsect3">
564 <a name="pseudo-tcp-socket-shutdown.parameters"></a><h4>Parameters</h4>
565 <div class="informaltable"><table class="informaltable" width="100%" border="0">
566 <colgroup>
567 <col width="150px" class="parameters_name">
568 <col class="parameters_description">
569 <col width="200px" class="parameters_annotations">
570 </colgroup>
571 <tbody>
572 <tr>
573 <td class="parameter_name"><p>self</p></td>
574 <td class="parameter_description"><p>The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> object.</p></td>
575 <td class="parameter_annotations"> </td>
576 </tr>
577 <tr>
578 <td class="parameter_name"><p>how</p></td>
579 <td class="parameter_description"><p>The directions of the connection to shut down.</p></td>
580 <td class="parameter_annotations"> </td>
581 </tr>
582 </tbody>
583 </table></div>
584 </div>
585 <p class="since">Since: <a class="link" href="ix12.html#api-index-0.1.8">0.1.8</a></p>
586 </div>
587 <hr>
588 <div class="refsect2">
589 <a name="pseudo-tcp-socket-is-closed"></a><h3>pseudo_tcp_socket_is_closed ()</h3>
590 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
591 pseudo_tcp_socket_is_closed (<em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> *self</code></em>);</pre>
592 <p>Gets whether the socket is closed, with the shutdown handshake completed,
593 and both peers no longer able to read or write data to the connection.</p>
594 <div class="refsect3">
595 <a name="pseudo-tcp-socket-is-closed.parameters"></a><h4>Parameters</h4>
596 <div class="informaltable"><table class="informaltable" width="100%" border="0">
597 <colgroup>
598 <col width="150px" class="parameters_name">
599 <col class="parameters_description">
600 <col width="200px" class="parameters_annotations">
601 </colgroup>
602 <tbody><tr>
603 <td class="parameter_name"><p>self</p></td>
604 <td class="parameter_description"><p>The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> object.</p></td>
605 <td class="parameter_annotations"> </td>
606 </tr></tbody>
607 </table></div>
608 </div>
609 <div class="refsect3">
610 <a name="pseudo-tcp-socket-is-closed.returns"></a><h4>Returns</h4>
611 <p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the socket is closed in both directions, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
612 </div>
613 <p class="since">Since: <a class="link" href="ix12.html#api-index-0.1.8">0.1.8</a></p>
614 </div>
615 <hr>
616 <div class="refsect2">
617 <a name="pseudo-tcp-socket-is-closed-remotely"></a><h3>pseudo_tcp_socket_is_closed_remotely ()</h3>
618 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
619 pseudo_tcp_socket_is_closed_remotely (<em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> *self</code></em>);</pre>
620 <p>Gets whether the socket has been closed on the remote peer’s side of the
621 connection (i.e. whether <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-close" title="pseudo_tcp_socket_close ()"><code class="function">pseudo_tcp_socket_close()</code></a> has been called there).
622 This is guaranteed to return <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-is-closed" title="pseudo_tcp_socket_is_closed ()"><code class="function">pseudo_tcp_socket_is_closed()</code></a> returns
623 <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>. It will not return <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> after <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-close" title="pseudo_tcp_socket_close ()"><code class="function">pseudo_tcp_socket_close()</code></a> is called
624 until a FIN segment is received from the remote peer.</p>
625 <div class="refsect3">
626 <a name="pseudo-tcp-socket-is-closed-remotely.parameters"></a><h4>Parameters</h4>
627 <div class="informaltable"><table class="informaltable" width="100%" border="0">
628 <colgroup>
629 <col width="150px" class="parameters_name">
630 <col class="parameters_description">
631 <col width="200px" class="parameters_annotations">
632 </colgroup>
633 <tbody><tr>
634 <td class="parameter_name"><p>self</p></td>
635 <td class="parameter_description"><p>The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> object.</p></td>
636 <td class="parameter_annotations"> </td>
637 </tr></tbody>
638 </table></div>
639 </div>
640 <div class="refsect3">
641 <a name="pseudo-tcp-socket-is-closed-remotely.returns"></a><h4>Returns</h4>
642 <p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the remote peer has closed its side of the connection,
643 <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
644 </div>
645 <p class="since">Since: <a class="link" href="ix12.html#api-index-0.1.8">0.1.8</a></p>
646 </div>
647 <hr>
648 <div class="refsect2">
649 <a name="pseudo-tcp-socket-get-error"></a><h3>pseudo_tcp_socket_get_error ()</h3>
650 <pre class="programlisting"><span class="returnvalue">int</span>
651 pseudo_tcp_socket_get_error (<em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> *self</code></em>);</pre>
652 <p>Return the last encountered error.</p>
653 <div class="note">
654 <p>
655      The return value can be :
656      </p>
657 <p>
658        EINVAL (for <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-connect" title="pseudo_tcp_socket_connect ()"><code class="function">pseudo_tcp_socket_connect()</code></a>).
659      </p>
660 <p>
661      </p>
662 <p>
663        EWOULDBLOCK or ENOTCONN (for <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-recv" title="pseudo_tcp_socket_recv ()"><code class="function">pseudo_tcp_socket_recv()</code></a> and
664        <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-send" title="pseudo_tcp_socket_send ()"><code class="function">pseudo_tcp_socket_send()</code></a>).
665      </p>
666 <p>
667    </p>
668 </div>
669 <div class="refsect3">
670 <a name="pseudo-tcp-socket-get-error.parameters"></a><h4>Parameters</h4>
671 <div class="informaltable"><table class="informaltable" width="100%" border="0">
672 <colgroup>
673 <col width="150px" class="parameters_name">
674 <col class="parameters_description">
675 <col width="200px" class="parameters_annotations">
676 </colgroup>
677 <tbody><tr>
678 <td class="parameter_name"><p>self</p></td>
679 <td class="parameter_description"><p>The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> object.</p></td>
680 <td class="parameter_annotations"> </td>
681 </tr></tbody>
682 </table></div>
683 </div>
684 <div class="refsect3">
685 <a name="pseudo-tcp-socket-get-error.returns"></a><h4>Returns</h4>
686 <p> The error code</p>
687 <p> See also: <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-connect" title="pseudo_tcp_socket_connect ()"><code class="function">pseudo_tcp_socket_connect()</code></a> </p>
688 <p> See also: <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-recv" title="pseudo_tcp_socket_recv ()"><code class="function">pseudo_tcp_socket_recv()</code></a> </p>
689 <p> See also: <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-send" title="pseudo_tcp_socket_send ()"><code class="function">pseudo_tcp_socket_send()</code></a> </p>
690 </div>
691 <p class="since">Since: <a class="link" href="ix08.html#api-index-0.0.11">0.0.11</a></p>
692 </div>
693 <hr>
694 <div class="refsect2">
695 <a name="pseudo-tcp-socket-get-next-clock"></a><h3>pseudo_tcp_socket_get_next_clock ()</h3>
696 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
697 pseudo_tcp_socket_get_next_clock (<em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> *self</code></em>,
698                                   <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"><span class="type">guint64</span></a> *timeout</code></em>);</pre>
699 <p>Call this to determine the timeout needed before the next time call
700 to <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-notify-clock" title="pseudo_tcp_socket_notify_clock ()"><code class="function">pseudo_tcp_socket_notify_clock()</code></a> should be made.</p>
701 <div class="refsect3">
702 <a name="pseudo-tcp-socket-get-next-clock.parameters"></a><h4>Parameters</h4>
703 <div class="informaltable"><table class="informaltable" width="100%" border="0">
704 <colgroup>
705 <col width="150px" class="parameters_name">
706 <col class="parameters_description">
707 <col width="200px" class="parameters_annotations">
708 </colgroup>
709 <tbody>
710 <tr>
711 <td class="parameter_name"><p>self</p></td>
712 <td class="parameter_description"><p>The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> object.</p></td>
713 <td class="parameter_annotations"> </td>
714 </tr>
715 <tr>
716 <td class="parameter_name"><p>timeout</p></td>
717 <td class="parameter_description"><p>A pointer to be filled with the new timeout.</p></td>
718 <td class="parameter_annotations"> </td>
719 </tr>
720 </tbody>
721 </table></div>
722 </div>
723 <div class="refsect3">
724 <a name="pseudo-tcp-socket-get-next-clock.returns"></a><h4>Returns</h4>
725 <p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>timeout</code></em>
726 was filled, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the socket is closed and
727 ready to be destroyed.</p>
728 <p> See also: <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-notify-clock" title="pseudo_tcp_socket_notify_clock ()"><code class="function">pseudo_tcp_socket_notify_clock()</code></a> </p>
729 </div>
730 <p class="since">Since: <a class="link" href="ix08.html#api-index-0.0.11">0.0.11</a></p>
731 </div>
732 <hr>
733 <div class="refsect2">
734 <a name="pseudo-tcp-socket-notify-clock"></a><h3>pseudo_tcp_socket_notify_clock ()</h3>
735 <pre class="programlisting"><span class="returnvalue">void</span>
736 pseudo_tcp_socket_notify_clock (<em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> *self</code></em>);</pre>
737 <p>Start the processing of receiving data, pending data or syn/acks.
738 Call this based on timeout value returned by
739 <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-get-next-clock" title="pseudo_tcp_socket_get_next_clock ()"><code class="function">pseudo_tcp_socket_get_next_clock()</code></a>.
740 It's ok to call this too frequently.</p>
741 <p> See also: <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-get-next-clock" title="pseudo_tcp_socket_get_next_clock ()"><code class="function">pseudo_tcp_socket_get_next_clock()</code></a> </p>
742 <div class="refsect3">
743 <a name="pseudo-tcp-socket-notify-clock.parameters"></a><h4>Parameters</h4>
744 <div class="informaltable"><table class="informaltable" width="100%" border="0">
745 <colgroup>
746 <col width="150px" class="parameters_name">
747 <col class="parameters_description">
748 <col width="200px" class="parameters_annotations">
749 </colgroup>
750 <tbody><tr>
751 <td class="parameter_name"><p>self</p></td>
752 <td class="parameter_description"><p>The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> object.</p></td>
753 <td class="parameter_annotations"> </td>
754 </tr></tbody>
755 </table></div>
756 </div>
757 <p class="since">Since: <a class="link" href="ix08.html#api-index-0.0.11">0.0.11</a></p>
758 </div>
759 <hr>
760 <div class="refsect2">
761 <a name="pseudo-tcp-socket-notify-mtu"></a><h3>pseudo_tcp_socket_notify_mtu ()</h3>
762 <pre class="programlisting"><span class="returnvalue">void</span>
763 pseudo_tcp_socket_notify_mtu (<em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> *self</code></em>,
764                               <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint16"><span class="type">guint16</span></a> mtu</code></em>);</pre>
765 <p>Set the MTU of the socket</p>
766 <div class="refsect3">
767 <a name="pseudo-tcp-socket-notify-mtu.parameters"></a><h4>Parameters</h4>
768 <div class="informaltable"><table class="informaltable" width="100%" border="0">
769 <colgroup>
770 <col width="150px" class="parameters_name">
771 <col class="parameters_description">
772 <col width="200px" class="parameters_annotations">
773 </colgroup>
774 <tbody>
775 <tr>
776 <td class="parameter_name"><p>self</p></td>
777 <td class="parameter_description"><p>The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> object.</p></td>
778 <td class="parameter_annotations"> </td>
779 </tr>
780 <tr>
781 <td class="parameter_name"><p>mtu</p></td>
782 <td class="parameter_description"><p>The new MTU of the socket</p></td>
783 <td class="parameter_annotations"> </td>
784 </tr>
785 </tbody>
786 </table></div>
787 </div>
788 <p class="since">Since: <a class="link" href="ix08.html#api-index-0.0.11">0.0.11</a></p>
789 </div>
790 <hr>
791 <div class="refsect2">
792 <a name="pseudo-tcp-socket-notify-packet"></a><h3>pseudo_tcp_socket_notify_packet ()</h3>
793 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
794 pseudo_tcp_socket_notify_packet (<em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> *self</code></em>,
795                                  <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *buffer</code></em>,
796                                  <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> len</code></em>);</pre>
797 <p>Notify the <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> when a new packet arrives</p>
798 <div class="refsect3">
799 <a name="pseudo-tcp-socket-notify-packet.parameters"></a><h4>Parameters</h4>
800 <div class="informaltable"><table class="informaltable" width="100%" border="0">
801 <colgroup>
802 <col width="150px" class="parameters_name">
803 <col class="parameters_description">
804 <col width="200px" class="parameters_annotations">
805 </colgroup>
806 <tbody>
807 <tr>
808 <td class="parameter_name"><p>self</p></td>
809 <td class="parameter_description"><p>The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> object.</p></td>
810 <td class="parameter_annotations"> </td>
811 </tr>
812 <tr>
813 <td class="parameter_name"><p>buffer</p></td>
814 <td class="parameter_description"><p>The buffer containing the received data</p></td>
815 <td class="parameter_annotations"> </td>
816 </tr>
817 <tr>
818 <td class="parameter_name"><p>len</p></td>
819 <td class="parameter_description"><p>The length of <em class="parameter"><code>buffer</code></em>
820 </p></td>
821 <td class="parameter_annotations"> </td>
822 </tr>
823 </tbody>
824 </table></div>
825 </div>
826 <div class="refsect3">
827 <a name="pseudo-tcp-socket-notify-packet.returns"></a><h4>Returns</h4>
828 <p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the packet was processed successfully, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
829 </div>
830 <p class="since">Since: <a class="link" href="ix08.html#api-index-0.0.11">0.0.11</a></p>
831 </div>
832 <hr>
833 <div class="refsect2">
834 <a name="pseudo-tcp-set-debug-level"></a><h3>pseudo_tcp_set_debug_level ()</h3>
835 <pre class="programlisting"><span class="returnvalue">void</span>
836 pseudo_tcp_set_debug_level (<em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpDebugLevel" title="enum PseudoTcpDebugLevel"><span class="type">PseudoTcpDebugLevel</span></a> level</code></em>);</pre>
837 <p>Sets the debug level to enable/disable normal/verbose debug messages.</p>
838 <div class="refsect3">
839 <a name="pseudo-tcp-set-debug-level.parameters"></a><h4>Parameters</h4>
840 <div class="informaltable"><table class="informaltable" width="100%" border="0">
841 <colgroup>
842 <col width="150px" class="parameters_name">
843 <col class="parameters_description">
844 <col width="200px" class="parameters_annotations">
845 </colgroup>
846 <tbody><tr>
847 <td class="parameter_name"><p>level</p></td>
848 <td class="parameter_description"><p>The level of debug to set</p></td>
849 <td class="parameter_annotations"> </td>
850 </tr></tbody>
851 </table></div>
852 </div>
853 <p class="since">Since: <a class="link" href="ix08.html#api-index-0.0.11">0.0.11</a></p>
854 </div>
855 <hr>
856 <div class="refsect2">
857 <a name="pseudo-tcp-socket-get-available-bytes"></a><h3>pseudo_tcp_socket_get_available_bytes ()</h3>
858 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
859 pseudo_tcp_socket_get_available_bytes (<em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> *self</code></em>);</pre>
860 <p>Gets the number of bytes of data in the buffer that can be read without
861 receiving more packets from the network.</p>
862 <div class="refsect3">
863 <a name="pseudo-tcp-socket-get-available-bytes.parameters"></a><h4>Parameters</h4>
864 <div class="informaltable"><table class="informaltable" width="100%" border="0">
865 <colgroup>
866 <col width="150px" class="parameters_name">
867 <col class="parameters_description">
868 <col width="200px" class="parameters_annotations">
869 </colgroup>
870 <tbody><tr>
871 <td class="parameter_name"><p>self</p></td>
872 <td class="parameter_description"><p>The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> object.</p></td>
873 <td class="parameter_annotations"> </td>
874 </tr></tbody>
875 </table></div>
876 </div>
877 <div class="refsect3">
878 <a name="pseudo-tcp-socket-get-available-bytes.returns"></a><h4>Returns</h4>
879 <p> The number of bytes or -1 if the connection is not established</p>
880 </div>
881 <p class="since">Since: <a class="link" href="ix10.html#api-index-0.1.5">0.1.5</a></p>
882 </div>
883 <hr>
884 <div class="refsect2">
885 <a name="pseudo-tcp-socket-can-send"></a><h3>pseudo_tcp_socket_can_send ()</h3>
886 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
887 pseudo_tcp_socket_can_send (<em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> *self</code></em>);</pre>
888 <p>Returns if there is space in the send buffer to send any data.</p>
889 <div class="refsect3">
890 <a name="pseudo-tcp-socket-can-send.parameters"></a><h4>Parameters</h4>
891 <div class="informaltable"><table class="informaltable" width="100%" border="0">
892 <colgroup>
893 <col width="150px" class="parameters_name">
894 <col class="parameters_description">
895 <col width="200px" class="parameters_annotations">
896 </colgroup>
897 <tbody><tr>
898 <td class="parameter_name"><p>self</p></td>
899 <td class="parameter_description"><p>The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> object.</p></td>
900 <td class="parameter_annotations"> </td>
901 </tr></tbody>
902 </table></div>
903 </div>
904 <div class="refsect3">
905 <a name="pseudo-tcp-socket-can-send.returns"></a><h4>Returns</h4>
906 <p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if data can be sent, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
907 </div>
908 <p class="since">Since: <a class="link" href="ix10.html#api-index-0.1.5">0.1.5</a></p>
909 </div>
910 <hr>
911 <div class="refsect2">
912 <a name="pseudo-tcp-socket-get-available-send-space"></a><h3>pseudo_tcp_socket_get_available_send_space ()</h3>
913 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"><span class="returnvalue">gsize</span></a>
914 pseudo_tcp_socket_get_available_send_space
915                                (<em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> *self</code></em>);</pre>
916 <p>Gets the number of bytes of space available in the transmission buffer.</p>
917 <div class="refsect3">
918 <a name="pseudo-tcp-socket-get-available-send-space.parameters"></a><h4>Parameters</h4>
919 <div class="informaltable"><table class="informaltable" width="100%" border="0">
920 <colgroup>
921 <col width="150px" class="parameters_name">
922 <col class="parameters_description">
923 <col width="200px" class="parameters_annotations">
924 </colgroup>
925 <tbody><tr>
926 <td class="parameter_name"><p>self</p></td>
927 <td class="parameter_description"><p>The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> object.</p></td>
928 <td class="parameter_annotations"> </td>
929 </tr></tbody>
930 </table></div>
931 </div>
932 <div class="refsect3">
933 <a name="pseudo-tcp-socket-get-available-send-space.returns"></a><h4>Returns</h4>
934 <p> The number of bytes, or 0 if the connection is not established.</p>
935 </div>
936 <p class="since">Since: <a class="link" href="ix10.html#api-index-0.1.5">0.1.5</a></p>
937 </div>
938 <hr>
939 <div class="refsect2">
940 <a name="pseudo-tcp-socket-notify-message"></a><h3>pseudo_tcp_socket_notify_message ()</h3>
941 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
942 pseudo_tcp_socket_notify_message (<em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> *self</code></em>,
943                                   <em class="parameter"><code><a class="link" href="NiceAgent.html#NiceInputMessage" title="NiceInputMessage"><span class="type">NiceInputMessage</span></a> *message</code></em>);</pre>
944 <p>Notify the <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> that a new message has arrived, and enqueue the
945 data in its buffers to the <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a>’s receive buffer.</p>
946 <div class="refsect3">
947 <a name="pseudo-tcp-socket-notify-message.parameters"></a><h4>Parameters</h4>
948 <div class="informaltable"><table class="informaltable" width="100%" border="0">
949 <colgroup>
950 <col width="150px" class="parameters_name">
951 <col class="parameters_description">
952 <col width="200px" class="parameters_annotations">
953 </colgroup>
954 <tbody>
955 <tr>
956 <td class="parameter_name"><p>self</p></td>
957 <td class="parameter_description"><p>The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> object.</p></td>
958 <td class="parameter_annotations"> </td>
959 </tr>
960 <tr>
961 <td class="parameter_name"><p>message</p></td>
962 <td class="parameter_description"><p>A <a class="link" href="NiceAgent.html#NiceInputMessage" title="NiceInputMessage"><span class="type">NiceInputMessage</span></a> containing the received data.</p></td>
963 <td class="parameter_annotations"> </td>
964 </tr>
965 </tbody>
966 </table></div>
967 </div>
968 <div class="refsect3">
969 <a name="pseudo-tcp-socket-notify-message.returns"></a><h4>Returns</h4>
970 <p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the packet was processed successfully, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
971 </div>
972 <p class="since">Since: <a class="link" href="ix10.html#api-index-0.1.5">0.1.5</a></p>
973 </div>
974 <hr>
975 <div class="refsect2">
976 <a name="pseudo-tcp-socket-set-time"></a><h3>pseudo_tcp_socket_set_time ()</h3>
977 <pre class="programlisting"><span class="returnvalue">void</span>
978 pseudo_tcp_socket_set_time (<em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> *self</code></em>,
979                             <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> current_time</code></em>);</pre>
980 <p>Sets the current monotonic time to be used by the TCP socket when calculating
981 timeouts and expiry times. If this function is not called, or is called with
982 <em class="parameter"><code>current_time</code></em>
983  as zero, <a href="/usr/share/gtk-doc/html/glib/glib-Date-and-Time-Functions.html#g-get-monotonic-time"><code class="function">g_get_monotonic_time()</code></a> will be used. Otherwise, the
984 specified <em class="parameter"><code>current_time</code></em>
985  will be used until it is updated by calling this
986 function again.</p>
987 <p>This function is intended for testing only, and should not be used in
988 production code.</p>
989 <div class="refsect3">
990 <a name="pseudo-tcp-socket-set-time.parameters"></a><h4>Parameters</h4>
991 <div class="informaltable"><table class="informaltable" width="100%" border="0">
992 <colgroup>
993 <col width="150px" class="parameters_name">
994 <col class="parameters_description">
995 <col width="200px" class="parameters_annotations">
996 </colgroup>
997 <tbody>
998 <tr>
999 <td class="parameter_name"><p>self</p></td>
1000 <td class="parameter_description"><p>The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> object.</p></td>
1001 <td class="parameter_annotations"> </td>
1002 </tr>
1003 <tr>
1004 <td class="parameter_name"><p>current_time</p></td>
1005 <td class="parameter_description"><p>Current monotonic time, in milliseconds; or zero to use the
1006 system monotonic clock.</p></td>
1007 <td class="parameter_annotations"> </td>
1008 </tr>
1009 </tbody>
1010 </table></div>
1011 </div>
1012 <p class="since">Since: <a class="link" href="ix12.html#api-index-0.1.8">0.1.8</a></p>
1013 </div>
1014 </div>
1015 <div class="refsect1">
1016 <a name="libnice-Pseudo-TCP-Socket.other_details"></a><h2>Types and Values</h2>
1017 <div class="refsect2">
1018 <a name="PseudoTcpSocket-struct"></a><h3>PseudoTcpSocket</h3>
1019 <pre class="programlisting">typedef struct _PseudoTcpSocket PseudoTcpSocket;</pre>
1020 <p>The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> is the GObject implementing the Pseudo TCP Socket</p>
1021 <p class="since">Since: <a class="link" href="ix08.html#api-index-0.0.11">0.0.11</a></p>
1022 </div>
1023 <hr>
1024 <div class="refsect2">
1025 <a name="PseudoTcpState"></a><h3>enum PseudoTcpState</h3>
1026 <p>An enum representing the state of the <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a>. These states
1027 correspond to the TCP states in RFC 793.</p>
1028 <p> See also: <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket--state" title="The “state” property"><span class="type">“state”</span></a> </p>
1029 <div class="refsect3">
1030 <a name="PseudoTcpState.members"></a><h4>Members</h4>
1031 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1032 <colgroup>
1033 <col width="300px" class="enum_members_name">
1034 <col class="enum_members_description">
1035 <col width="200px" class="enum_members_annotations">
1036 </colgroup>
1037 <tbody>
1038 <tr>
1039 <td class="enum_member_name"><p><a name="PSEUDO-TCP-LISTEN:CAPS"></a>PSEUDO_TCP_LISTEN</p></td>
1040 <td class="enum_member_description">
1041 <p>The socket's initial state. The socket isn't connected and is
1042 listening for an incoming connection</p>
1043 </td>
1044 <td class="enum_member_annotations"> </td>
1045 </tr>
1046 <tr>
1047 <td class="enum_member_name"><p><a name="PSEUDO-TCP-SYN-SENT:CAPS"></a>PSEUDO_TCP_SYN_SENT</p></td>
1048 <td class="enum_member_description">
1049 <p>The socket has sent a connection request (SYN) packet and is
1050 waiting for an answer</p>
1051 </td>
1052 <td class="enum_member_annotations"> </td>
1053 </tr>
1054 <tr>
1055 <td class="enum_member_name"><p><a name="PSEUDO-TCP-SYN-RECEIVED:CAPS"></a>PSEUDO_TCP_SYN_RECEIVED</p></td>
1056 <td class="enum_member_description">
1057 <p>The socket has received a connection request (SYN) packet.</p>
1058 </td>
1059 <td class="enum_member_annotations"> </td>
1060 </tr>
1061 <tr>
1062 <td class="enum_member_name"><p><a name="PSEUDO-TCP-ESTABLISHED:CAPS"></a>PSEUDO_TCP_ESTABLISHED</p></td>
1063 <td class="enum_member_description">
1064 <p>The socket is connected</p>
1065 </td>
1066 <td class="enum_member_annotations"> </td>
1067 </tr>
1068 <tr>
1069 <td class="enum_member_name"><p><a name="PSEUDO-TCP-CLOSED:CAPS"></a>PSEUDO_TCP_CLOSED</p></td>
1070 <td class="enum_member_description">
1071 <p>The socket has been closed</p>
1072 </td>
1073 <td class="enum_member_annotations"> </td>
1074 </tr>
1075 <tr>
1076 <td class="enum_member_name"><p><a name="PSEUDO-TCP-FIN-WAIT-1:CAPS"></a>PSEUDO_TCP_FIN_WAIT_1</p></td>
1077 <td class="enum_member_description">
1078 <p>The socket has been closed locally but not remotely
1079 (Since: 0.1.8)</p>
1080 </td>
1081 <td class="enum_member_annotations"> </td>
1082 </tr>
1083 <tr>
1084 <td class="enum_member_name"><p><a name="PSEUDO-TCP-FIN-WAIT-2:CAPS"></a>PSEUDO_TCP_FIN_WAIT_2</p></td>
1085 <td class="enum_member_description">
1086 <p>The socket has been closed locally but not remotely
1087 (Since: 0.1.8)</p>
1088 </td>
1089 <td class="enum_member_annotations"> </td>
1090 </tr>
1091 <tr>
1092 <td class="enum_member_name"><p><a name="PSEUDO-TCP-CLOSING:CAPS"></a>PSEUDO_TCP_CLOSING</p></td>
1093 <td class="enum_member_description">
1094 <p>The socket has been closed locally and remotely
1095 (Since: 0.1.8)</p>
1096 </td>
1097 <td class="enum_member_annotations"> </td>
1098 </tr>
1099 <tr>
1100 <td class="enum_member_name"><p><a name="PSEUDO-TCP-TIME-WAIT:CAPS"></a>PSEUDO_TCP_TIME_WAIT</p></td>
1101 <td class="enum_member_description">
1102 <p>The socket has been closed locally and remotely
1103 (Since: 0.1.8)</p>
1104 </td>
1105 <td class="enum_member_annotations"> </td>
1106 </tr>
1107 <tr>
1108 <td class="enum_member_name"><p><a name="PSEUDO-TCP-CLOSE-WAIT:CAPS"></a>PSEUDO_TCP_CLOSE_WAIT</p></td>
1109 <td class="enum_member_description">
1110 <p>The socket has been closed remotely but not locally
1111 (Since: 0.1.8)</p>
1112 </td>
1113 <td class="enum_member_annotations"> </td>
1114 </tr>
1115 <tr>
1116 <td class="enum_member_name"><p><a name="PSEUDO-TCP-LAST-ACK:CAPS"></a>PSEUDO_TCP_LAST_ACK</p></td>
1117 <td class="enum_member_description">
1118 <p>The socket has been closed locally and remotely
1119 (Since: 0.1.8)</p>
1120 </td>
1121 <td class="enum_member_annotations"> </td>
1122 </tr>
1123 </tbody>
1124 </table></div>
1125 </div>
1126 <p class="since">Since: <a class="link" href="ix08.html#api-index-0.0.11">0.0.11</a></p>
1127 </div>
1128 <hr>
1129 <div class="refsect2">
1130 <a name="PseudoTcpWriteResult"></a><h3>enum PseudoTcpWriteResult</h3>
1131 <p>An enum representing the result value of the write operation requested by
1132 the <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a>.</p>
1133 <p> See also: <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpCallbacks" title="PseudoTcpCallbacks"><code class="literal">PseudoTcpCallbacks</code></a>:WritePacket </p>
1134 <div class="refsect3">
1135 <a name="PseudoTcpWriteResult.members"></a><h4>Members</h4>
1136 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1137 <colgroup>
1138 <col width="300px" class="enum_members_name">
1139 <col class="enum_members_description">
1140 <col width="200px" class="enum_members_annotations">
1141 </colgroup>
1142 <tbody>
1143 <tr>
1144 <td class="enum_member_name"><p><a name="WR-SUCCESS:CAPS"></a>WR_SUCCESS</p></td>
1145 <td class="enum_member_description">
1146 <p>The write operation was successful</p>
1147 </td>
1148 <td class="enum_member_annotations"> </td>
1149 </tr>
1150 <tr>
1151 <td class="enum_member_name"><p><a name="WR-TOO-LARGE:CAPS"></a>WR_TOO_LARGE</p></td>
1152 <td class="enum_member_description">
1153 <p>The socket type requires that message be sent atomically
1154 and the size of the message to be sent made this impossible.</p>
1155 </td>
1156 <td class="enum_member_annotations"> </td>
1157 </tr>
1158 <tr>
1159 <td class="enum_member_name"><p><a name="WR-FAIL:CAPS"></a>WR_FAIL</p></td>
1160 <td class="enum_member_description">
1161 <p>There was an error sending the message</p>
1162 </td>
1163 <td class="enum_member_annotations"> </td>
1164 </tr>
1165 </tbody>
1166 </table></div>
1167 </div>
1168 <p class="since">Since: <a class="link" href="ix08.html#api-index-0.0.11">0.0.11</a></p>
1169 </div>
1170 <hr>
1171 <div class="refsect2">
1172 <a name="PseudoTcpCallbacks"></a><h3>PseudoTcpCallbacks</h3>
1173 <pre class="programlisting">typedef struct {
1174   gpointer user_data;
1175   void  (*PseudoTcpOpened) (PseudoTcpSocket *tcp, gpointer data);
1176   void  (*PseudoTcpReadable) (PseudoTcpSocket *tcp, gpointer data);
1177   void  (*PseudoTcpWritable) (PseudoTcpSocket *tcp, gpointer data);
1178   void  (*PseudoTcpClosed) (PseudoTcpSocket *tcp, guint32 error, gpointer data);
1179   PseudoTcpWriteResult (*WritePacket) (PseudoTcpSocket *tcp,
1180       const gchar * buffer, guint32 len, gpointer data);
1181 } PseudoTcpCallbacks;
1182 </pre>
1183 <p>A structure containing callbacks functions that will be called by the
1184 <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> when some events happen.</p>
1185 <p> See also: <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpWriteResult" title="enum PseudoTcpWriteResult"><span class="type">PseudoTcpWriteResult</span></a> </p>
1186 <div class="refsect3">
1187 <a name="PseudoTcpCallbacks.members"></a><h4>Members</h4>
1188 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1189 <colgroup>
1190 <col width="300px" class="struct_members_name">
1191 <col class="struct_members_description">
1192 <col width="200px" class="struct_members_annotations">
1193 </colgroup>
1194 <tbody>
1195 <tr>
1196 <td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> <em class="structfield"><code><a name="PseudoTcpCallbacks.user-data"></a>user_data</code></em>;</p></td>
1197 <td class="struct_member_description"><p>A user defined pointer to be passed to the callbacks</p></td>
1198 <td class="struct_member_annotations"> </td>
1199 </tr>
1200 <tr>
1201 <td class="struct_member_name"><p><em class="structfield"><code><a name="PseudoTcpCallbacks.PseudoTcpOpened"></a>PseudoTcpOpened</code></em> ()</p></td>
1202 <td class="struct_member_description"><p>The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> is now connected</p></td>
1203 <td class="struct_member_annotations"> </td>
1204 </tr>
1205 <tr>
1206 <td class="struct_member_name"><p><em class="structfield"><code><a name="PseudoTcpCallbacks.PseudoTcpReadable"></a>PseudoTcpReadable</code></em> ()</p></td>
1207 <td class="struct_member_description"><p>The socket is readable</p></td>
1208 <td class="struct_member_annotations"> </td>
1209 </tr>
1210 <tr>
1211 <td class="struct_member_name"><p><em class="structfield"><code><a name="PseudoTcpCallbacks.PseudoTcpWritable"></a>PseudoTcpWritable</code></em> ()</p></td>
1212 <td class="struct_member_description"><p>The socket is writable</p></td>
1213 <td class="struct_member_annotations"> </td>
1214 </tr>
1215 <tr>
1216 <td class="struct_member_name"><p><em class="structfield"><code><a name="PseudoTcpCallbacks.PseudoTcpClosed"></a>PseudoTcpClosed</code></em> ()</p></td>
1217 <td class="struct_member_description"><p>The socket was closed (both sides)</p></td>
1218 <td class="struct_member_annotations"> </td>
1219 </tr>
1220 <tr>
1221 <td class="struct_member_name"><p><em class="structfield"><code><a name="PseudoTcpCallbacks.WritePacket"></a>WritePacket</code></em> ()</p></td>
1222 <td class="struct_member_description"><p>This callback is called when the socket needs to send data.</p></td>
1223 <td class="struct_member_annotations"> </td>
1224 </tr>
1225 </tbody>
1226 </table></div>
1227 </div>
1228 <p class="since">Since: <a class="link" href="ix08.html#api-index-0.0.11">0.0.11</a></p>
1229 </div>
1230 <hr>
1231 <div class="refsect2">
1232 <a name="PseudoTcpDebugLevel"></a><h3>enum PseudoTcpDebugLevel</h3>
1233 <p>Valid values of debug levels to be set.</p>
1234 <div class="refsect3">
1235 <a name="PseudoTcpDebugLevel.members"></a><h4>Members</h4>
1236 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1237 <colgroup>
1238 <col width="300px" class="enum_members_name">
1239 <col class="enum_members_description">
1240 <col width="200px" class="enum_members_annotations">
1241 </colgroup>
1242 <tbody>
1243 <tr>
1244 <td class="enum_member_name"><p><a name="PSEUDO-TCP-DEBUG-NONE:CAPS"></a>PSEUDO_TCP_DEBUG_NONE</p></td>
1245 <td class="enum_member_description">
1246 <p>Disable debug messages</p>
1247 </td>
1248 <td class="enum_member_annotations"> </td>
1249 </tr>
1250 <tr>
1251 <td class="enum_member_name"><p><a name="PSEUDO-TCP-DEBUG-NORMAL:CAPS"></a>PSEUDO_TCP_DEBUG_NORMAL</p></td>
1252 <td class="enum_member_description">
1253 <p>Enable basic debug messages</p>
1254 </td>
1255 <td class="enum_member_annotations"> </td>
1256 </tr>
1257 <tr>
1258 <td class="enum_member_name"><p><a name="PSEUDO-TCP-DEBUG-VERBOSE:CAPS"></a>PSEUDO_TCP_DEBUG_VERBOSE</p></td>
1259 <td class="enum_member_description">
1260 <p>Enable verbose debug messages</p>
1261 </td>
1262 <td class="enum_member_annotations"> </td>
1263 </tr>
1264 </tbody>
1265 </table></div>
1266 </div>
1267 <p class="since">Since: <a class="link" href="ix08.html#api-index-0.0.11">0.0.11</a></p>
1268 </div>
1269 <hr>
1270 <div class="refsect2">
1271 <a name="PseudoTcpShutdown"></a><h3>enum PseudoTcpShutdown</h3>
1272 <p>Options for which parts of a connection to shut down when calling
1273 <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-shutdown" title="pseudo_tcp_socket_shutdown ()"><code class="function">pseudo_tcp_socket_shutdown()</code></a>. These correspond to the values passed to POSIX
1274 <code class="function">shutdown()</code>.</p>
1275 <div class="refsect3">
1276 <a name="PseudoTcpShutdown.members"></a><h4>Members</h4>
1277 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1278 <colgroup>
1279 <col width="300px" class="enum_members_name">
1280 <col class="enum_members_description">
1281 <col width="200px" class="enum_members_annotations">
1282 </colgroup>
1283 <tbody>
1284 <tr>
1285 <td class="enum_member_name"><p><a name="PSEUDO-TCP-SHUTDOWN-RD:CAPS"></a>PSEUDO_TCP_SHUTDOWN_RD</p></td>
1286 <td class="enum_member_description">
1287 <p>Shut down the local reader only</p>
1288 </td>
1289 <td class="enum_member_annotations"> </td>
1290 </tr>
1291 <tr>
1292 <td class="enum_member_name"><p><a name="PSEUDO-TCP-SHUTDOWN-WR:CAPS"></a>PSEUDO_TCP_SHUTDOWN_WR</p></td>
1293 <td class="enum_member_description">
1294 <p>Shut down the local writer only</p>
1295 </td>
1296 <td class="enum_member_annotations"> </td>
1297 </tr>
1298 <tr>
1299 <td class="enum_member_name"><p><a name="PSEUDO-TCP-SHUTDOWN-RDWR:CAPS"></a>PSEUDO_TCP_SHUTDOWN_RDWR</p></td>
1300 <td class="enum_member_description">
1301 <p>Shut down both reading and writing</p>
1302 </td>
1303 <td class="enum_member_annotations"> </td>
1304 </tr>
1305 </tbody>
1306 </table></div>
1307 </div>
1308 <p class="since">Since: <a class="link" href="ix12.html#api-index-0.1.8">0.1.8</a></p>
1309 </div>
1310 </div>
1311 <div class="refsect1">
1312 <a name="libnice-Pseudo-TCP-Socket.property-details"></a><h2>Property Details</h2>
1313 <div class="refsect2">
1314 <a name="PseudoTcpSocket--ack-delay"></a><h3>The <code class="literal">“ack-delay”</code> property</h3>
1315 <pre class="programlisting">  “ack-delay”                <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
1316 <p>Delayed ACK timeout (in milliseconds).</p>
1317 <p>Flags: Read / Write</p>
1318 <p>Default value: 100</p>
1319 </div>
1320 <hr>
1321 <div class="refsect2">
1322 <a name="PseudoTcpSocket--callbacks"></a><h3>The <code class="literal">“callbacks”</code> property</h3>
1323 <pre class="programlisting">  “callbacks”                <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a></pre>
1324 <p>Structure with the callbacks to call when PseudoTcp events happen.</p>
1325 <p>Flags: Read / Write</p>
1326 </div>
1327 <hr>
1328 <div class="refsect2">
1329 <a name="PseudoTcpSocket--conversation"></a><h3>The <code class="literal">“conversation”</code> property</h3>
1330 <pre class="programlisting">  “conversation”             <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
1331 <p>The TCP Conversation ID.</p>
1332 <p>Flags: Read / Write / Construct Only</p>
1333 <p>Default value: 0</p>
1334 </div>
1335 <hr>
1336 <div class="refsect2">
1337 <a name="PseudoTcpSocket--no-delay"></a><h3>The <code class="literal">“no-delay”</code> property</h3>
1338 <pre class="programlisting">  “no-delay”                 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
1339 <p>Disable the Nagle algorithm (like the TCP_NODELAY option).</p>
1340 <p>Flags: Read / Write</p>
1341 <p>Default value: FALSE</p>
1342 </div>
1343 <hr>
1344 <div class="refsect2">
1345 <a name="PseudoTcpSocket--rcv-buf"></a><h3>The <code class="literal">“rcv-buf”</code> property</h3>
1346 <pre class="programlisting">  “rcv-buf”                  <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
1347 <p>Receive Buffer size.</p>
1348 <p>Flags: Read / Write</p>
1349 <p>Allowed values: &gt;= 1</p>
1350 <p>Default value: 61440</p>
1351 </div>
1352 <hr>
1353 <div class="refsect2">
1354 <a name="PseudoTcpSocket--snd-buf"></a><h3>The <code class="literal">“snd-buf”</code> property</h3>
1355 <pre class="programlisting">  “snd-buf”                  <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
1356 <p>Send Buffer size.</p>
1357 <p>Flags: Read / Write</p>
1358 <p>Allowed values: &gt;= 1</p>
1359 <p>Default value: 92160</p>
1360 </div>
1361 <hr>
1362 <div class="refsect2">
1363 <a name="PseudoTcpSocket--state"></a><h3>The <code class="literal">“state”</code> property</h3>
1364 <pre class="programlisting">  “state”                    <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
1365 <p>The current state (enum PseudoTcpState) of the PseudoTcp socket.</p>
1366 <p>Flags: Read</p>
1367 <p>Allowed values: &lt;= 4</p>
1368 <p>Default value: 0</p>
1369 </div>
1370 <hr>
1371 <div class="refsect2">
1372 <a name="PseudoTcpSocket--support-fin-ack"></a><h3>The <code class="literal">“support-fin-ack”</code> property</h3>
1373 <pre class="programlisting">  “support-fin-ack”          <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
1374 <p>Whether to support the FIN–ACK extension to the pseudo-TCP protocol for
1375 this socket. The extension is only compatible with other libnice pseudo-TCP
1376 stacks, and not with Jingle pseudo-TCP stacks. If enabled, support is
1377 negotiatied on connection setup, so it is safe for a <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> with
1378 support enabled to be used with one with it disabled, or with a Jingle
1379 pseudo-TCP socket which doesn’t support it at all.</p>
1380 <p>Support is enabled by default.</p>
1381 <p>Flags: Read / Write / Construct Only</p>
1382 <p>Default value: TRUE</p>
1383 <p class="since">Since: <a class="link" href="ix12.html#api-index-0.1.8">0.1.8</a></p>
1384 </div>
1385 </div>
1386 </div>
1387 <div class="footer">
1388 <hr>Generated by GTK-Doc V1.29</div>
1389 </body>
1390 </html>