blob: 52669f1057e792380fd08d36a2211b53e7796ff9 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GTcpConnection: GIO Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="GIO Reference Manual">
<link rel="up" href="highlevel-socket.html" title="High-level network functionallity">
<link rel="prev" href="GUnixConnection.html" title="GUnixConnection">
<link rel="next" href="GTcpWrapperConnection.html" title="GTcpWrapperConnection">
<meta name="generator" content="GTK-Doc V1.25.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
<a href="#GTcpConnection.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
<a href="#GTcpConnection.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span> 
<a href="#GTcpConnection.properties" class="shortcut">Properties</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="highlevel-socket.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="GUnixConnection.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GTcpWrapperConnection.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GTcpConnection"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GTcpConnection.top_of_page"></a>GTcpConnection</span></h2>
<p>GTcpConnection — A TCP GSocketConnection</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GTcpConnection.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GTcpConnection.html#g-tcp-connection-set-graceful-disconnect" title="g_tcp_connection_set_graceful_disconnect ()">g_tcp_connection_set_graceful_disconnect</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GTcpConnection.html#g-tcp-connection-get-graceful-disconnect" title="g_tcp_connection_get_graceful_disconnect ()">g_tcp_connection_get_graceful_disconnect</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GTcpConnection.properties"></a><h2>Properties</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="properties_type">
<col width="300px" class="properties_name">
<col width="200px" class="properties_flags">
</colgroup>
<tbody><tr>
<td class="property_type"><a href="../glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
<td class="property_name"><a class="link" href="GTcpConnection.html#GTcpConnection--graceful-disconnect" title="The “graceful-disconnect” property">graceful-disconnect</a></td>
<td class="property_flags">Read / Write</td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GTcpConnection.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody><tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="GTcpConnection.html#GTcpConnection-struct" title="GTcpConnection">GTcpConnection</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GTcpConnection.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen"> <a href="../gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
<span class="lineart">╰──</span> <a class="link" href="GIOStream.html" title="GIOStream">GIOStream</a>
<span class="lineart">╰──</span> <a class="link" href="GSocketConnection.html" title="GSocketConnection">GSocketConnection</a>
<span class="lineart">╰──</span> GTcpConnection
<span class="lineart">╰──</span> <a class="link" href="GTcpWrapperConnection.html" title="GTcpWrapperConnection">GTcpWrapperConnection</a>
</pre>
</div>
<div class="refsect1">
<a name="GTcpConnection.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gio/gio.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="GTcpConnection.description"></a><h2>Description</h2>
<p>This is the subclass of <a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="type">GSocketConnection</span></a> that is created
for TCP/IP sockets.</p>
</div>
<div class="refsect1">
<a name="GTcpConnection.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="g-tcp-connection-set-graceful-disconnect"></a><h3>g_tcp_connection_set_graceful_disconnect ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_tcp_connection_set_graceful_disconnect
(<em class="parameter"><code><a class="link" href="GTcpConnection.html" title="GTcpConnection"><span class="type">GTcpConnection</span></a> *connection</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> graceful_disconnect</code></em>);</pre>
<p>This enables graceful disconnects on close. A graceful disconnect
means that we signal the receiving end that the connection is terminated
and wait for it to close the connection before closing the connection.</p>
<p>A graceful disconnect means that we can be sure that we successfully sent
all the outstanding data to the other end, or get an error reported.
However, it also means we have to wait for all the data to reach the
other side and for it to acknowledge this by closing the socket, which may
take a while. For this reason it is disabled by default.</p>
<div class="refsect3">
<a name="g-tcp-connection-set-graceful-disconnect.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>connection</p></td>
<td class="parameter_description"><p>a <a class="link" href="GTcpConnection.html" title="GTcpConnection"><span class="type">GTcpConnection</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>graceful_disconnect</p></td>
<td class="parameter_description"><p>Whether to do graceful disconnects or not</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-22.html#api-index-2.22">2.22</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-tcp-connection-get-graceful-disconnect"></a><h3>g_tcp_connection_get_graceful_disconnect ()</h3>
<pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
g_tcp_connection_get_graceful_disconnect
(<em class="parameter"><code><a class="link" href="GTcpConnection.html" title="GTcpConnection"><span class="type">GTcpConnection</span></a> *connection</code></em>);</pre>
<p>Checks if graceful disconnects are used. See
<a class="link" href="GTcpConnection.html#g-tcp-connection-set-graceful-disconnect" title="g_tcp_connection_set_graceful_disconnect ()"><code class="function">g_tcp_connection_set_graceful_disconnect()</code></a>.</p>
<div class="refsect3">
<a name="g-tcp-connection-get-graceful-disconnect.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>connection</p></td>
<td class="parameter_description"><p>a <a class="link" href="GTcpConnection.html" title="GTcpConnection"><span class="type">GTcpConnection</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-tcp-connection-get-graceful-disconnect.returns"></a><h4>Returns</h4>
<p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if graceful disconnect is used on close, <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-22.html#api-index-2.22">2.22</a></p>
</div>
</div>
<div class="refsect1">
<a name="GTcpConnection.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GTcpConnection-struct"></a><h3>GTcpConnection</h3>
<pre class="programlisting">typedef struct _GTcpConnection GTcpConnection;</pre>
<p>A <a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="type">GSocketConnection</span></a> for TCP/IP connections.</p>
<p class="since">Since: <a class="link" href="api-index-2-22.html#api-index-2.22">2.22</a></p>
</div>
</div>
<div class="refsect1">
<a name="GTcpConnection.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GTcpConnection--graceful-disconnect"></a><h3>The <code class="literal">“graceful-disconnect”</code> property</h3>
<pre class="programlisting"> “graceful-disconnect” <a href="../glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
<p>Whether or not close does a graceful disconnect.</p>
<p>Flags: Read / Write</p>
<p>Default value: FALSE</p>
</div>
</div>
<div class="refsect1">
<a name="GTcpConnection.see-also"></a><h2>See Also</h2>
<p><a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="type">GSocketConnection</span></a>.</p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25.1</div>
</body>
</html>