blob: 988bb4398573f43fceab3a247fe0a59e2e2eb8f6 [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>GSocketClient: 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="highlevel-socket.html" title="High-level network functionallity">
<link rel="next" href="GSocketConnection.html" title="GSocketConnection">
<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="#GSocketClient.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
<a href="#GSocketClient.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span> 
<a href="#GSocketClient.properties" class="shortcut">Properties</a></span><span id="nav_signals">  <span class="dim">|</span> 
<a href="#GSocketClient.signals" class="shortcut">Signals</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="highlevel-socket.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GSocketConnection.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GSocketClient"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GSocketClient.top_of_page"></a>GSocketClient</span></h2>
<p>GSocketClient — Helper for connecting to a network service</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GSocketClient.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">
<a class="link" href="GSocketClient.html" title="GSocketClient"><span class="returnvalue">GSocketClient</span></a> *
</td>
<td class="function_name">
<a class="link" href="GSocketClient.html#g-socket-client-new" title="g_socket_client_new ()">g_socket_client_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="returnvalue">GSocketConnection</span></a> *
</td>
<td class="function_name">
<a class="link" href="GSocketClient.html#g-socket-client-connect" title="g_socket_client_connect ()">g_socket_client_connect</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GSocketClient.html#g-socket-client-connect-async" title="g_socket_client_connect_async ()">g_socket_client_connect_async</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="returnvalue">GSocketConnection</span></a> *
</td>
<td class="function_name">
<a class="link" href="GSocketClient.html#g-socket-client-connect-finish" title="g_socket_client_connect_finish ()">g_socket_client_connect_finish</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="returnvalue">GSocketConnection</span></a> *
</td>
<td class="function_name">
<a class="link" href="GSocketClient.html#g-socket-client-connect-to-host" title="g_socket_client_connect_to_host ()">g_socket_client_connect_to_host</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GSocketClient.html#g-socket-client-connect-to-host-async" title="g_socket_client_connect_to_host_async ()">g_socket_client_connect_to_host_async</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="returnvalue">GSocketConnection</span></a> *
</td>
<td class="function_name">
<a class="link" href="GSocketClient.html#g-socket-client-connect-to-host-finish" title="g_socket_client_connect_to_host_finish ()">g_socket_client_connect_to_host_finish</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="returnvalue">GSocketConnection</span></a> *
</td>
<td class="function_name">
<a class="link" href="GSocketClient.html#g-socket-client-connect-to-service" title="g_socket_client_connect_to_service ()">g_socket_client_connect_to_service</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GSocketClient.html#g-socket-client-connect-to-service-async" title="g_socket_client_connect_to_service_async ()">g_socket_client_connect_to_service_async</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="returnvalue">GSocketConnection</span></a> *
</td>
<td class="function_name">
<a class="link" href="GSocketClient.html#g-socket-client-connect-to-service-finish" title="g_socket_client_connect_to_service_finish ()">g_socket_client_connect_to_service_finish</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="returnvalue">GSocketConnection</span></a> *
</td>
<td class="function_name">
<a class="link" href="GSocketClient.html#g-socket-client-connect-to-uri" title="g_socket_client_connect_to_uri ()">g_socket_client_connect_to_uri</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GSocketClient.html#g-socket-client-connect-to-uri-async" title="g_socket_client_connect_to_uri_async ()">g_socket_client_connect_to_uri_async</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="returnvalue">GSocketConnection</span></a> *
</td>
<td class="function_name">
<a class="link" href="GSocketClient.html#g-socket-client-connect-to-uri-finish" title="g_socket_client_connect_to_uri_finish ()">g_socket_client_connect_to_uri_finish</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GSocketClient.html#g-socket-client-set-family" title="g_socket_client_set_family ()">g_socket_client_set_family</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GSocketClient.html#g-socket-client-set-local-address" title="g_socket_client_set_local_address ()">g_socket_client_set_local_address</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GSocketClient.html#g-socket-client-set-protocol" title="g_socket_client_set_protocol ()">g_socket_client_set_protocol</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GSocketClient.html#g-socket-client-set-socket-type" title="g_socket_client_set_socket_type ()">g_socket_client_set_socket_type</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GSocketClient.html#g-socket-client-set-timeout" title="g_socket_client_set_timeout ()">g_socket_client_set_timeout</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GSocketClient.html#g-socket-client-set-enable-proxy" title="g_socket_client_set_enable_proxy ()">g_socket_client_set_enable_proxy</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GSocketClient.html#g-socket-client-set-proxy-resolver" title="g_socket_client_set_proxy_resolver ()">g_socket_client_set_proxy_resolver</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GSocketClient.html#g-socket-client-set-tls" title="g_socket_client_set_tls ()">g_socket_client_set_tls</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GSocketClient.html#g-socket-client-set-tls-validation-flags" title="g_socket_client_set_tls_validation_flags ()">g_socket_client_set_tls_validation_flags</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GSocketAddress.html#GSocketFamily" title="enum GSocketFamily"><span class="returnvalue">GSocketFamily</span></a>
</td>
<td class="function_name">
<a class="link" href="GSocketClient.html#g-socket-client-get-family" title="g_socket_client_get_family ()">g_socket_client_get_family</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="returnvalue">GSocketAddress</span></a> *
</td>
<td class="function_name">
<a class="link" href="GSocketClient.html#g-socket-client-get-local-address" title="g_socket_client_get_local_address ()">g_socket_client_get_local_address</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GSocket.html#GSocketProtocol" title="enum GSocketProtocol"><span class="returnvalue">GSocketProtocol</span></a>
</td>
<td class="function_name">
<a class="link" href="GSocketClient.html#g-socket-client-get-protocol" title="g_socket_client_get_protocol ()">g_socket_client_get_protocol</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GSocket.html#GSocketType" title="enum GSocketType"><span class="returnvalue">GSocketType</span></a>
</td>
<td class="function_name">
<a class="link" href="GSocketClient.html#g-socket-client-get-socket-type" title="g_socket_client_get_socket_type ()">g_socket_client_get_socket_type</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<a class="link" href="GSocketClient.html#g-socket-client-get-timeout" title="g_socket_client_get_timeout ()">g_socket_client_get_timeout</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="GSocketClient.html#g-socket-client-get-enable-proxy" title="g_socket_client_get_enable_proxy ()">g_socket_client_get_enable_proxy</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GProxyResolver.html" title="GProxyResolver"><span class="returnvalue">GProxyResolver</span></a> *
</td>
<td class="function_name">
<a class="link" href="GSocketClient.html#g-socket-client-get-proxy-resolver" title="g_socket_client_get_proxy_resolver ()">g_socket_client_get_proxy_resolver</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="GSocketClient.html#g-socket-client-get-tls" title="g_socket_client_get_tls ()">g_socket_client_get_tls</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gio-TLS-Overview.html#GTlsCertificateFlags" title="enum GTlsCertificateFlags"><span class="returnvalue">GTlsCertificateFlags</span></a>
</td>
<td class="function_name">
<a class="link" href="GSocketClient.html#g-socket-client-get-tls-validation-flags" title="g_socket_client_get_tls_validation_flags ()">g_socket_client_get_tls_validation_flags</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GSocketClient.html#g-socket-client-add-application-proxy" title="g_socket_client_add_application_proxy ()">g_socket_client_add_application_proxy</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GSocketClient.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="GSocketClient.html#GSocketClient--enable-proxy" title="The “enable-proxy” property">enable-proxy</a></td>
<td class="property_flags">Read / Write / Construct</td>
</tr>
<tr>
<td class="property_type"><a class="link" href="GSocketAddress.html#GSocketFamily" title="enum GSocketFamily"><span class="type">GSocketFamily</span></a></td>
<td class="property_name"><a class="link" href="GSocketClient.html#GSocketClient--family" title="The “family” property">family</a></td>
<td class="property_flags">Read / Write / Construct</td>
</tr>
<tr>
<td class="property_type">
<a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="type">GSocketAddress</span></a> *</td>
<td class="property_name"><a class="link" href="GSocketClient.html#GSocketClient--local-address" title="The “local-address” property">local-address</a></td>
<td class="property_flags">Read / Write / Construct</td>
</tr>
<tr>
<td class="property_type"><a class="link" href="GSocket.html#GSocketProtocol" title="enum GSocketProtocol"><span class="type">GSocketProtocol</span></a></td>
<td class="property_name"><a class="link" href="GSocketClient.html#GSocketClient--protocol" title="The “protocol” property">protocol</a></td>
<td class="property_flags">Read / Write / Construct</td>
</tr>
<tr>
<td class="property_type">
<a class="link" href="GProxyResolver.html" title="GProxyResolver"><span class="type">GProxyResolver</span></a> *</td>
<td class="property_name"><a class="link" href="GSocketClient.html#GSocketClient--proxy-resolver" title="The “proxy-resolver” property">proxy-resolver</a></td>
<td class="property_flags">Read / Write / Construct</td>
</tr>
<tr>
<td class="property_type"><a href="../glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
<td class="property_name"><a class="link" href="GSocketClient.html#GSocketClient--timeout" title="The “timeout” property">timeout</a></td>
<td class="property_flags">Read / Write / Construct</td>
</tr>
<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="GSocketClient.html#GSocketClient--tls" title="The “tls” property">tls</a></td>
<td class="property_flags">Read / Write / Construct</td>
</tr>
<tr>
<td class="property_type"><a class="link" href="gio-TLS-Overview.html#GTlsCertificateFlags" title="enum GTlsCertificateFlags"><span class="type">GTlsCertificateFlags</span></a></td>
<td class="property_name"><a class="link" href="GSocketClient.html#GSocketClient--tls-validation-flags" title="The “tls-validation-flags” property">tls-validation-flags</a></td>
<td class="property_flags">Read / Write / Construct</td>
</tr>
<tr>
<td class="property_type"><a class="link" href="GSocket.html#GSocketType" title="enum GSocketType"><span class="type">GSocketType</span></a></td>
<td class="property_name"><a class="link" href="GSocketClient.html#GSocketClient--type" title="The “type” property">type</a></td>
<td class="property_flags">Read / Write / Construct</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GSocketClient.signals"></a><h2>Signals</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="signals_return">
<col width="300px" class="signals_name">
<col width="200px" class="signals_flags">
</colgroup>
<tbody><tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="GSocketClient.html#GSocketClient-event" title="The “event” signal">event</a></td>
<td class="signal_flags"><a href="../gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GSocketClient.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="GSocketClient.html#GSocketClient-struct" title="GSocketClient">GSocketClient</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="GSocketClient.html#GSocketClientEvent" title="enum GSocketClientEvent">GSocketClientEvent</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GSocketClient.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> GSocketClient
</pre>
</div>
<div class="refsect1">
<a name="GSocketClient.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gio/gio.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="GSocketClient.description"></a><h2>Description</h2>
<p><a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> is a lightweight high-level utility class for connecting to
a network host using a connection oriented socket type.</p>
<p>You create a <a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> object, set any options you want, and then
call a sync or async connect operation, which returns a <a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="type">GSocketConnection</span></a>
subclass on success.</p>
<p>The type of the <a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="type">GSocketConnection</span></a> object returned depends on the type of
the underlying socket that is in use. For instance, for a TCP/IP connection
it will be a <a class="link" href="GTcpConnection.html" title="GTcpConnection"><span class="type">GTcpConnection</span></a>.</p>
<p>As <a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> is a lightweight object, you don't need to cache it. You
can just create a new one any time you need one.</p>
</div>
<div class="refsect1">
<a name="GSocketClient.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="g-socket-client-new"></a><h3>g_socket_client_new ()</h3>
<pre class="programlisting"><a class="link" href="GSocketClient.html" title="GSocketClient"><span class="returnvalue">GSocketClient</span></a> *
g_socket_client_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Creates a new <a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> with the default options.</p>
<div class="refsect3">
<a name="g-socket-client-new.returns"></a><h4>Returns</h4>
<p> a <a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a>.
Free the returned object with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.</p>
</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-socket-client-connect"></a><h3>g_socket_client_connect ()</h3>
<pre class="programlisting"><a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="returnvalue">GSocketConnection</span></a> *
g_socket_client_connect (<em class="parameter"><code><a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> *client</code></em>,
<em class="parameter"><code><a class="link" href="GSocketConnectable.html" title="GSocketConnectable"><span class="type">GSocketConnectable</span></a> *connectable</code></em>,
<em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Tries to resolve the <em class="parameter"><code>connectable</code></em>
and make a network connection to it.</p>
<p>Upon a successful connection, a new <a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="type">GSocketConnection</span></a> is constructed
and returned. The caller owns this new object and must drop their
reference to it when finished with it.</p>
<p>The type of the <a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="type">GSocketConnection</span></a> object returned depends on the type of
the underlying socket that is used. For instance, for a TCP/IP connection
it will be a <a class="link" href="GTcpConnection.html" title="GTcpConnection"><span class="type">GTcpConnection</span></a>.</p>
<p>The socket created will be the same family as the address that the
<em class="parameter"><code>connectable</code></em>
resolves to, unless family is set with <a class="link" href="GSocketClient.html#g-socket-client-set-family" title="g_socket_client_set_family ()"><code class="function">g_socket_client_set_family()</code></a>
or indirectly via <a class="link" href="GSocketClient.html#g-socket-client-set-local-address" title="g_socket_client_set_local_address ()"><code class="function">g_socket_client_set_local_address()</code></a>. The socket type
defaults to <a class="link" href="GSocket.html#G-SOCKET-TYPE-STREAM:CAPS"><code class="literal">G_SOCKET_TYPE_STREAM</code></a> but can be set with
<a class="link" href="GSocketClient.html#g-socket-client-set-socket-type" title="g_socket_client_set_socket_type ()"><code class="function">g_socket_client_set_socket_type()</code></a>.</p>
<p>If a local address is specified with <a class="link" href="GSocketClient.html#g-socket-client-set-local-address" title="g_socket_client_set_local_address ()"><code class="function">g_socket_client_set_local_address()</code></a> the
socket will be bound to this address before connecting.</p>
<div class="refsect3">
<a name="g-socket-client-connect.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>client</p></td>
<td class="parameter_description"><p>a <a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>connectable</p></td>
<td class="parameter_description"><p>a <a class="link" href="GSocketConnectable.html" title="GSocketConnectable"><span class="type">GSocketConnectable</span></a> specifying the remote address.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cancellable</p></td>
<td class="parameter_description"><p> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
<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>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-socket-client-connect.returns"></a><h4>Returns</h4>
<p> a <a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="type">GSocketConnection</span></a> on success, <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</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-socket-client-connect-async"></a><h3>g_socket_client_connect_async ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_socket_client_connect_async (<em class="parameter"><code><a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> *client</code></em>,
<em class="parameter"><code><a class="link" href="GSocketConnectable.html" title="GSocketConnectable"><span class="type">GSocketConnectable</span></a> *connectable</code></em>,
<em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>This is the asynchronous version of <a class="link" href="GSocketClient.html#g-socket-client-connect" title="g_socket_client_connect ()"><code class="function">g_socket_client_connect()</code></a>.</p>
<p>When the operation is finished <em class="parameter"><code>callback</code></em>
will be
called. You can then call <a class="link" href="GSocketClient.html#g-socket-client-connect-finish" title="g_socket_client_connect_finish ()"><code class="function">g_socket_client_connect_finish()</code></a> to get
the result of the operation.</p>
<div class="refsect3">
<a name="g-socket-client-connect-async.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>client</p></td>
<td class="parameter_description"><p>a <a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>connectable</p></td>
<td class="parameter_description"><p>a <a class="link" href="GSocketConnectable.html" title="GSocketConnectable"><span class="type">GSocketConnectable</span></a> specifying the remote address.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cancellable</p></td>
<td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<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>
</tr>
<tr>
<td class="parameter_name"><p>callback</p></td>
<td class="parameter_description"><p> a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p> user data for the callback. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></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-socket-client-connect-finish"></a><h3>g_socket_client_connect_finish ()</h3>
<pre class="programlisting"><a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="returnvalue">GSocketConnection</span></a> *
g_socket_client_connect_finish (<em class="parameter"><code><a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> *client</code></em>,
<em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>,
<em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Finishes an async connect operation. See <a class="link" href="GSocketClient.html#g-socket-client-connect-async" title="g_socket_client_connect_async ()"><code class="function">g_socket_client_connect_async()</code></a></p>
<div class="refsect3">
<a name="g-socket-client-connect-finish.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>client</p></td>
<td class="parameter_description"><p>a <a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>result</p></td>
<td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> location to store the error occurring, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to
ignore.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-socket-client-connect-finish.returns"></a><h4>Returns</h4>
<p> a <a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="type">GSocketConnection</span></a> on success, <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</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-socket-client-connect-to-host"></a><h3>g_socket_client_connect_to_host ()</h3>
<pre class="programlisting"><a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="returnvalue">GSocketConnection</span></a> *
g_socket_client_connect_to_host (<em class="parameter"><code><a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> *client</code></em>,
<em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *host_and_port</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#guint16"><span class="type">guint16</span></a> default_port</code></em>,
<em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>This is a helper function for <a class="link" href="GSocketClient.html#g-socket-client-connect" title="g_socket_client_connect ()"><code class="function">g_socket_client_connect()</code></a>.</p>
<p>Attempts to create a TCP connection to the named host.</p>
<p><em class="parameter"><code>host_and_port</code></em>
may be in any of a number of recognized formats; an IPv6
address, an IPv4 address, or a domain name (in which case a DNS
lookup is performed). Quoting with [] is supported for all address
types. A port override may be specified in the usual way with a
colon. Ports may be given as decimal numbers or symbolic names (in
which case an /etc/services lookup is performed).</p>
<p>If no port override is given in <em class="parameter"><code>host_and_port</code></em>
then <em class="parameter"><code>default_port</code></em>
will be
used as the port number to connect to.</p>
<p>In general, <em class="parameter"><code>host_and_port</code></em>
is expected to be provided by the user (allowing
them to give the hostname, and a port override if necessary) and
<em class="parameter"><code>default_port</code></em>
is expected to be provided by the application.</p>
<p>In the case that an IP address is given, a single connection
attempt is made. In the case that a name is given, multiple
connection attempts may be made, in turn and according to the
number of address records in DNS, until a connection succeeds.</p>
<p>Upon a successful connection, a new <a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="type">GSocketConnection</span></a> is constructed
and returned. The caller owns this new object and must drop their
reference to it when finished with it.</p>
<p>In the event of any failure (DNS error, service not found, no hosts
connectable) <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned and <em class="parameter"><code>error</code></em>
(if non-<a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>) is set
accordingly.</p>
<div class="refsect3">
<a name="g-socket-client-connect-to-host.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>client</p></td>
<td class="parameter_description"><p>a <a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>host_and_port</p></td>
<td class="parameter_description"><p>the name and optionally port of the host to connect to</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>default_port</p></td>
<td class="parameter_description"><p>the default port to connect to</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cancellable</p></td>
<td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<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>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>a pointer to a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-socket-client-connect-to-host.returns"></a><h4>Returns</h4>
<p> a <a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="type">GSocketConnection</span></a> on success, <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</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-socket-client-connect-to-host-async"></a><h3>g_socket_client_connect_to_host_async ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_socket_client_connect_to_host_async (<em class="parameter"><code><a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> *client</code></em>,
<em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *host_and_port</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#guint16"><span class="type">guint16</span></a> default_port</code></em>,
<em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>This is the asynchronous version of <a class="link" href="GSocketClient.html#g-socket-client-connect-to-host" title="g_socket_client_connect_to_host ()"><code class="function">g_socket_client_connect_to_host()</code></a>.</p>
<p>When the operation is finished <em class="parameter"><code>callback</code></em>
will be
called. You can then call <a class="link" href="GSocketClient.html#g-socket-client-connect-to-host-finish" title="g_socket_client_connect_to_host_finish ()"><code class="function">g_socket_client_connect_to_host_finish()</code></a> to get
the result of the operation.</p>
<div class="refsect3">
<a name="g-socket-client-connect-to-host-async.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>client</p></td>
<td class="parameter_description"><p>a <a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>host_and_port</p></td>
<td class="parameter_description"><p>the name and optionally the port of the host to connect to</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>default_port</p></td>
<td class="parameter_description"><p>the default port to connect to</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cancellable</p></td>
<td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<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>
</tr>
<tr>
<td class="parameter_name"><p>callback</p></td>
<td class="parameter_description"><p> a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p> user data for the callback. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></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-socket-client-connect-to-host-finish"></a><h3>g_socket_client_connect_to_host_finish ()</h3>
<pre class="programlisting"><a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="returnvalue">GSocketConnection</span></a> *
g_socket_client_connect_to_host_finish
(<em class="parameter"><code><a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> *client</code></em>,
<em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>,
<em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Finishes an async connect operation. See <a class="link" href="GSocketClient.html#g-socket-client-connect-to-host-async" title="g_socket_client_connect_to_host_async ()"><code class="function">g_socket_client_connect_to_host_async()</code></a></p>
<div class="refsect3">
<a name="g-socket-client-connect-to-host-finish.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>client</p></td>
<td class="parameter_description"><p>a <a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>result</p></td>
<td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> location to store the error occurring, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to
ignore.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-socket-client-connect-to-host-finish.returns"></a><h4>Returns</h4>
<p> a <a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="type">GSocketConnection</span></a> on success, <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</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-socket-client-connect-to-service"></a><h3>g_socket_client_connect_to_service ()</h3>
<pre class="programlisting"><a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="returnvalue">GSocketConnection</span></a> *
g_socket_client_connect_to_service (<em class="parameter"><code><a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> *client</code></em>,
<em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *domain</code></em>,
<em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *service</code></em>,
<em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Attempts to create a TCP connection to a service.</p>
<p>This call looks up the SRV record for <em class="parameter"><code>service</code></em>
at <em class="parameter"><code>domain</code></em>
for the
"tcp" protocol. It then attempts to connect, in turn, to each of
the hosts providing the service until either a connection succeeds
or there are no hosts remaining.</p>
<p>Upon a successful connection, a new <a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="type">GSocketConnection</span></a> is constructed
and returned. The caller owns this new object and must drop their
reference to it when finished with it.</p>
<p>In the event of any failure (DNS error, service not found, no hosts
connectable) <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned and <em class="parameter"><code>error</code></em>
(if non-<a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>) is set
accordingly.</p>
<div class="refsect3">
<a name="g-socket-client-connect-to-service.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>client</p></td>
<td class="parameter_description"><p>a <a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="type">GSocketConnection</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>domain</p></td>
<td class="parameter_description"><p>a domain name</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>service</p></td>
<td class="parameter_description"><p>the name of the service to connect to</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cancellable</p></td>
<td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<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>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>a pointer to a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-socket-client-connect-to-service.returns"></a><h4>Returns</h4>
<p> a <a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="type">GSocketConnection</span></a> if successful, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-socket-client-connect-to-service-async"></a><h3>g_socket_client_connect_to_service_async ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_socket_client_connect_to_service_async
(<em class="parameter"><code><a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> *client</code></em>,
<em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *domain</code></em>,
<em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *service</code></em>,
<em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>This is the asynchronous version of
<a class="link" href="GSocketClient.html#g-socket-client-connect-to-service" title="g_socket_client_connect_to_service ()"><code class="function">g_socket_client_connect_to_service()</code></a>.</p>
<div class="refsect3">
<a name="g-socket-client-connect-to-service-async.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>client</p></td>
<td class="parameter_description"><p>a <a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>domain</p></td>
<td class="parameter_description"><p>a domain name</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>service</p></td>
<td class="parameter_description"><p>the name of the service to connect to</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cancellable</p></td>
<td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<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>
</tr>
<tr>
<td class="parameter_name"><p>callback</p></td>
<td class="parameter_description"><p> a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p> user data for the callback. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></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-socket-client-connect-to-service-finish"></a><h3>g_socket_client_connect_to_service_finish ()</h3>
<pre class="programlisting"><a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="returnvalue">GSocketConnection</span></a> *
g_socket_client_connect_to_service_finish
(<em class="parameter"><code><a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> *client</code></em>,
<em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>,
<em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Finishes an async connect operation. See <a class="link" href="GSocketClient.html#g-socket-client-connect-to-service-async" title="g_socket_client_connect_to_service_async ()"><code class="function">g_socket_client_connect_to_service_async()</code></a></p>
<div class="refsect3">
<a name="g-socket-client-connect-to-service-finish.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>client</p></td>
<td class="parameter_description"><p>a <a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>result</p></td>
<td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> location to store the error occurring, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to
ignore.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-socket-client-connect-to-service-finish.returns"></a><h4>Returns</h4>
<p> a <a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="type">GSocketConnection</span></a> on success, <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</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-socket-client-connect-to-uri"></a><h3>g_socket_client_connect_to_uri ()</h3>
<pre class="programlisting"><a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="returnvalue">GSocketConnection</span></a> *
g_socket_client_connect_to_uri (<em class="parameter"><code><a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> *client</code></em>,
<em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *uri</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#guint16"><span class="type">guint16</span></a> default_port</code></em>,
<em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>This is a helper function for <a class="link" href="GSocketClient.html#g-socket-client-connect" title="g_socket_client_connect ()"><code class="function">g_socket_client_connect()</code></a>.</p>
<p>Attempts to create a TCP connection with a network URI.</p>
<p><em class="parameter"><code>uri</code></em>
may be any valid URI containing an "authority" (hostname/port)
component. If a port is not specified in the URI, <em class="parameter"><code>default_port</code></em>
will be used. TLS will be negotiated if <a class="link" href="GSocketClient.html#GSocketClient--tls" title="The “tls” property"><span class="type">“tls”</span></a> is <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>.
(<a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> does not know to automatically assume TLS for
certain URI schemes.)</p>
<p>Using this rather than <a class="link" href="GSocketClient.html#g-socket-client-connect" title="g_socket_client_connect ()"><code class="function">g_socket_client_connect()</code></a> or
<a class="link" href="GSocketClient.html#g-socket-client-connect-to-host" title="g_socket_client_connect_to_host ()"><code class="function">g_socket_client_connect_to_host()</code></a> allows <a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> to
determine when to use application-specific proxy protocols.</p>
<p>Upon a successful connection, a new <a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="type">GSocketConnection</span></a> is constructed
and returned. The caller owns this new object and must drop their
reference to it when finished with it.</p>
<p>In the event of any failure (DNS error, service not found, no hosts
connectable) <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned and <em class="parameter"><code>error</code></em>
(if non-<a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>) is set
accordingly.</p>
<div class="refsect3">
<a name="g-socket-client-connect-to-uri.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>client</p></td>
<td class="parameter_description"><p>a <a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>A network URI</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>default_port</p></td>
<td class="parameter_description"><p>the default port to connect to</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cancellable</p></td>
<td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<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>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>a pointer to a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-socket-client-connect-to-uri.returns"></a><h4>Returns</h4>
<p> a <a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="type">GSocketConnection</span></a> on success, <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-socket-client-connect-to-uri-async"></a><h3>g_socket_client_connect_to_uri_async ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_socket_client_connect_to_uri_async (<em class="parameter"><code><a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> *client</code></em>,
<em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *uri</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#guint16"><span class="type">guint16</span></a> default_port</code></em>,
<em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>This is the asynchronous version of <a class="link" href="GSocketClient.html#g-socket-client-connect-to-uri" title="g_socket_client_connect_to_uri ()"><code class="function">g_socket_client_connect_to_uri()</code></a>.</p>
<p>When the operation is finished <em class="parameter"><code>callback</code></em>
will be
called. You can then call <a class="link" href="GSocketClient.html#g-socket-client-connect-to-uri-finish" title="g_socket_client_connect_to_uri_finish ()"><code class="function">g_socket_client_connect_to_uri_finish()</code></a> to get
the result of the operation.</p>
<div class="refsect3">
<a name="g-socket-client-connect-to-uri-async.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>client</p></td>
<td class="parameter_description"><p>a <a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>a network uri</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>default_port</p></td>
<td class="parameter_description"><p>the default port to connect to</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cancellable</p></td>
<td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<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>
</tr>
<tr>
<td class="parameter_name"><p>callback</p></td>
<td class="parameter_description"><p> a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p> user data for the callback. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-socket-client-connect-to-uri-finish"></a><h3>g_socket_client_connect_to_uri_finish ()</h3>
<pre class="programlisting"><a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="returnvalue">GSocketConnection</span></a> *
g_socket_client_connect_to_uri_finish (<em class="parameter"><code><a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> *client</code></em>,
<em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>,
<em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Finishes an async connect operation. See <a class="link" href="GSocketClient.html#g-socket-client-connect-to-uri-async" title="g_socket_client_connect_to_uri_async ()"><code class="function">g_socket_client_connect_to_uri_async()</code></a></p>
<div class="refsect3">
<a name="g-socket-client-connect-to-uri-finish.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>client</p></td>
<td class="parameter_description"><p>a <a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>result</p></td>
<td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> location to store the error occurring, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to
ignore.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-socket-client-connect-to-uri-finish.returns"></a><h4>Returns</h4>
<p> a <a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="type">GSocketConnection</span></a> on success, <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-socket-client-set-family"></a><h3>g_socket_client_set_family ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_socket_client_set_family (<em class="parameter"><code><a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> *client</code></em>,
<em class="parameter"><code><a class="link" href="GSocketAddress.html#GSocketFamily" title="enum GSocketFamily"><span class="type">GSocketFamily</span></a> family</code></em>);</pre>
<p>Sets the socket family of the socket client.
If this is set to something other than <a class="link" href="GSocketAddress.html#G-SOCKET-FAMILY-INVALID:CAPS"><code class="literal">G_SOCKET_FAMILY_INVALID</code></a>
then the sockets created by this object will be of the specified
family.</p>
<p>This might be useful for instance if you want to force the local
connection to be an ipv4 socket, even though the address might
be an ipv6 mapped to ipv4 address.</p>
<div class="refsect3">
<a name="g-socket-client-set-family.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>client</p></td>
<td class="parameter_description"><p>a <a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>family</p></td>
<td class="parameter_description"><p>a <a class="link" href="GSocketAddress.html#GSocketFamily" title="enum GSocketFamily"><span class="type">GSocketFamily</span></a></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-socket-client-set-local-address"></a><h3>g_socket_client_set_local_address ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_socket_client_set_local_address (<em class="parameter"><code><a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> *client</code></em>,
<em class="parameter"><code><a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="type">GSocketAddress</span></a> *address</code></em>);</pre>
<p>Sets the local address of the socket client.
The sockets created by this object will bound to the
specified address (if not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>) before connecting.</p>
<p>This is useful if you want to ensure that the local
side of the connection is on a specific port, or on
a specific interface.</p>
<div class="refsect3">
<a name="g-socket-client-set-local-address.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>client</p></td>
<td class="parameter_description"><p>a <a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>address</p></td>
<td class="parameter_description"><p> a <a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="type">GSocketAddress</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<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>
</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-socket-client-set-protocol"></a><h3>g_socket_client_set_protocol ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_socket_client_set_protocol (<em class="parameter"><code><a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> *client</code></em>,
<em class="parameter"><code><a class="link" href="GSocket.html#GSocketProtocol" title="enum GSocketProtocol"><span class="type">GSocketProtocol</span></a> protocol</code></em>);</pre>
<p>Sets the protocol of the socket client.
The sockets created by this object will use of the specified
protocol.</p>
<p>If <em class="parameter"><code>protocol</code></em>
is <code class="literal">0</code> that means to use the default
protocol for the socket family and type.</p>
<div class="refsect3">
<a name="g-socket-client-set-protocol.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>client</p></td>
<td class="parameter_description"><p>a <a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>protocol</p></td>
<td class="parameter_description"><p>a <a class="link" href="GSocket.html#GSocketProtocol" title="enum GSocketProtocol"><span class="type">GSocketProtocol</span></a></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-socket-client-set-socket-type"></a><h3>g_socket_client_set_socket_type ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_socket_client_set_socket_type (<em class="parameter"><code><a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> *client</code></em>,
<em class="parameter"><code><a class="link" href="GSocket.html#GSocketType" title="enum GSocketType"><span class="type">GSocketType</span></a> type</code></em>);</pre>
<p>Sets the socket type of the socket client.
The sockets created by this object will be of the specified
type.</p>
<p>It doesn't make sense to specify a type of <a class="link" href="GSocket.html#G-SOCKET-TYPE-DATAGRAM:CAPS"><code class="literal">G_SOCKET_TYPE_DATAGRAM</code></a>,
as GSocketClient is used for connection oriented services.</p>
<div class="refsect3">
<a name="g-socket-client-set-socket-type.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>client</p></td>
<td class="parameter_description"><p>a <a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>a <a class="link" href="GSocket.html#GSocketType" title="enum GSocketType"><span class="type">GSocketType</span></a></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-socket-client-set-timeout"></a><h3>g_socket_client_set_timeout ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_socket_client_set_timeout (<em class="parameter"><code><a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> *client</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#guint"><span class="type">guint</span></a> timeout</code></em>);</pre>
<p>Sets the I/O timeout for sockets created by <em class="parameter"><code>client</code></em>
. <em class="parameter"><code>timeout</code></em>
is a
time in seconds, or 0 for no timeout (the default).</p>
<p>The timeout value affects the initial connection attempt as well,
so setting this may cause calls to <a class="link" href="GSocketClient.html#g-socket-client-connect" title="g_socket_client_connect ()"><code class="function">g_socket_client_connect()</code></a>, etc,
to fail with <a class="link" href="gio-GIOError.html#G-IO-ERROR-TIMED-OUT:CAPS"><code class="literal">G_IO_ERROR_TIMED_OUT</code></a>.</p>
<div class="refsect3">
<a name="g-socket-client-set-timeout.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>client</p></td>
<td class="parameter_description"><p>a <a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>timeout</p></td>
<td class="parameter_description"><p>the timeout</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-socket-client-set-enable-proxy"></a><h3>g_socket_client_set_enable_proxy ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_socket_client_set_enable_proxy (<em class="parameter"><code><a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> *client</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> enable</code></em>);</pre>
<p>Sets whether or not <em class="parameter"><code>client</code></em>
attempts to make connections via a
proxy server. When enabled (the default), <a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> will use a
<a class="link" href="GProxyResolver.html" title="GProxyResolver"><span class="type">GProxyResolver</span></a> to determine if a proxy protocol such as SOCKS is
needed, and automatically do the necessary proxy negotiation.</p>
<p>See also <a class="link" href="GSocketClient.html#g-socket-client-set-proxy-resolver" title="g_socket_client_set_proxy_resolver ()"><code class="function">g_socket_client_set_proxy_resolver()</code></a>.</p>
<div class="refsect3">
<a name="g-socket-client-set-enable-proxy.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>client</p></td>
<td class="parameter_description"><p>a <a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>enable</p></td>
<td class="parameter_description"><p>whether to enable proxies</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-socket-client-set-proxy-resolver"></a><h3>g_socket_client_set_proxy_resolver ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_socket_client_set_proxy_resolver (<em class="parameter"><code><a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> *client</code></em>,
<em class="parameter"><code><a class="link" href="GProxyResolver.html" title="GProxyResolver"><span class="type">GProxyResolver</span></a> *proxy_resolver</code></em>);</pre>
<p>Overrides the <a class="link" href="GProxyResolver.html" title="GProxyResolver"><span class="type">GProxyResolver</span></a> used by <em class="parameter"><code>client</code></em>
. You can call this if
you want to use specific proxies, rather than using the system
default proxy settings.</p>
<p>Note that whether or not the proxy resolver is actually used
depends on the setting of <a class="link" href="GSocketClient.html#GSocketClient--enable-proxy" title="The “enable-proxy” property"><span class="type">“enable-proxy”</span></a>, which is not
changed by this function (but which is <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> by default)</p>
<div class="refsect3">
<a name="g-socket-client-set-proxy-resolver.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>client</p></td>
<td class="parameter_description"><p>a <a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>proxy_resolver</p></td>
<td class="parameter_description"><p> a <a class="link" href="GProxyResolver.html" title="GProxyResolver"><span class="type">GProxyResolver</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for the
default. </p></td>
<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>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-36.html#api-index-2.36">2.36</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-socket-client-set-tls"></a><h3>g_socket_client_set_tls ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_socket_client_set_tls (<em class="parameter"><code><a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> *client</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> tls</code></em>);</pre>
<p>Sets whether <em class="parameter"><code>client</code></em>
creates TLS (aka SSL) connections. If <em class="parameter"><code>tls</code></em>
is
<a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, <em class="parameter"><code>client</code></em>
will wrap its connections in a <a class="link" href="GTlsClientConnection.html" title="GTlsClientConnection"><span class="type">GTlsClientConnection</span></a>
and perform a TLS handshake when connecting.</p>
<p>Note that since <a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> must return a <a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="type">GSocketConnection</span></a>,
but <a class="link" href="GTlsClientConnection.html" title="GTlsClientConnection"><span class="type">GTlsClientConnection</span></a> is not a <a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="type">GSocketConnection</span></a>, this
actually wraps the resulting <a class="link" href="GTlsClientConnection.html" title="GTlsClientConnection"><span class="type">GTlsClientConnection</span></a> in a
<a class="link" href="GTcpWrapperConnection.html" title="GTcpWrapperConnection"><span class="type">GTcpWrapperConnection</span></a> when returning it. You can use
<a class="link" href="GTcpWrapperConnection.html#g-tcp-wrapper-connection-get-base-io-stream" title="g_tcp_wrapper_connection_get_base_io_stream ()"><code class="function">g_tcp_wrapper_connection_get_base_io_stream()</code></a> on the return value
to extract the <a class="link" href="GTlsClientConnection.html" title="GTlsClientConnection"><span class="type">GTlsClientConnection</span></a>.</p>
<p>If you need to modify the behavior of the TLS handshake (eg, by
setting a client-side certificate to use, or connecting to the
<a class="link" href="GTlsConnection.html#GTlsConnection-accept-certificate" title="The “accept-certificate” signal"><span class="type">“accept-certificate”</span></a> signal), you can connect to
<em class="parameter"><code>client</code></em>
's <a class="link" href="GSocketClient.html#GSocketClient-event" title="The “event” signal"><span class="type">“event”</span></a> signal and wait for it to be
emitted with <a class="link" href="GSocketClient.html#G-SOCKET-CLIENT-TLS-HANDSHAKING:CAPS"><code class="literal">G_SOCKET_CLIENT_TLS_HANDSHAKING</code></a>, which will give you
a chance to see the <a class="link" href="GTlsClientConnection.html" title="GTlsClientConnection"><span class="type">GTlsClientConnection</span></a> before the handshake
starts.</p>
<div class="refsect3">
<a name="g-socket-client-set-tls.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>client</p></td>
<td class="parameter_description"><p>a <a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>tls</p></td>
<td class="parameter_description"><p>whether to use TLS</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-28.html#api-index-2.28">2.28</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-socket-client-set-tls-validation-flags"></a><h3>g_socket_client_set_tls_validation_flags ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_socket_client_set_tls_validation_flags
(<em class="parameter"><code><a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> *client</code></em>,
<em class="parameter"><code><a class="link" href="gio-TLS-Overview.html#GTlsCertificateFlags" title="enum GTlsCertificateFlags"><span class="type">GTlsCertificateFlags</span></a> flags</code></em>);</pre>
<p>Sets the TLS validation flags used when creating TLS connections
via <em class="parameter"><code>client</code></em>
. The default value is <a class="link" href="gio-TLS-Overview.html#G-TLS-CERTIFICATE-VALIDATE-ALL:CAPS"><code class="literal">G_TLS_CERTIFICATE_VALIDATE_ALL</code></a>.</p>
<div class="refsect3">
<a name="g-socket-client-set-tls-validation-flags.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>client</p></td>
<td class="parameter_description"><p>a <a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>the validation flags</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-28.html#api-index-2.28">2.28</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-socket-client-get-family"></a><h3>g_socket_client_get_family ()</h3>
<pre class="programlisting"><a class="link" href="GSocketAddress.html#GSocketFamily" title="enum GSocketFamily"><span class="returnvalue">GSocketFamily</span></a>
g_socket_client_get_family (<em class="parameter"><code><a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> *client</code></em>);</pre>
<p>Gets the socket family of the socket client.</p>
<p>See <a class="link" href="GSocketClient.html#g-socket-client-set-family" title="g_socket_client_set_family ()"><code class="function">g_socket_client_set_family()</code></a> for details.</p>
<div class="refsect3">
<a name="g-socket-client-get-family.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>client</p></td>
<td class="parameter_description"><p>a <a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-socket-client-get-family.returns"></a><h4>Returns</h4>
<p> a <a class="link" href="GSocketAddress.html#GSocketFamily" title="enum GSocketFamily"><span class="type">GSocketFamily</span></a></p>
</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-socket-client-get-local-address"></a><h3>g_socket_client_get_local_address ()</h3>
<pre class="programlisting"><a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="returnvalue">GSocketAddress</span></a> *
g_socket_client_get_local_address (<em class="parameter"><code><a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> *client</code></em>);</pre>
<p>Gets the local address of the socket client.</p>
<p>See <a class="link" href="GSocketClient.html#g-socket-client-set-local-address" title="g_socket_client_set_local_address ()"><code class="function">g_socket_client_set_local_address()</code></a> for details.</p>
<div class="refsect3">
<a name="g-socket-client-get-local-address.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>client</p></td>
<td class="parameter_description"><p>a <a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-socket-client-get-local-address.returns"></a><h4>Returns</h4>
<p> a <a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="type">GSocketAddress</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. Do not free. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</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-socket-client-get-protocol"></a><h3>g_socket_client_get_protocol ()</h3>
<pre class="programlisting"><a class="link" href="GSocket.html#GSocketProtocol" title="enum GSocketProtocol"><span class="returnvalue">GSocketProtocol</span></a>
g_socket_client_get_protocol (<em class="parameter"><code><a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> *client</code></em>);</pre>
<p>Gets the protocol name type of the socket client.</p>
<p>See <a class="link" href="GSocketClient.html#g-socket-client-set-protocol" title="g_socket_client_set_protocol ()"><code class="function">g_socket_client_set_protocol()</code></a> for details.</p>
<div class="refsect3">
<a name="g-socket-client-get-protocol.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>client</p></td>
<td class="parameter_description"><p>a <a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-socket-client-get-protocol.returns"></a><h4>Returns</h4>
<p> a <a class="link" href="GSocket.html#GSocketProtocol" title="enum GSocketProtocol"><span class="type">GSocketProtocol</span></a></p>
</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-socket-client-get-socket-type"></a><h3>g_socket_client_get_socket_type ()</h3>
<pre class="programlisting"><a class="link" href="GSocket.html#GSocketType" title="enum GSocketType"><span class="returnvalue">GSocketType</span></a>
g_socket_client_get_socket_type (<em class="parameter"><code><a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> *client</code></em>);</pre>
<p>Gets the socket type of the socket client.</p>
<p>See <a class="link" href="GSocketClient.html#g-socket-client-set-socket-type" title="g_socket_client_set_socket_type ()"><code class="function">g_socket_client_set_socket_type()</code></a> for details.</p>
<div class="refsect3">
<a name="g-socket-client-get-socket-type.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>client</p></td>
<td class="parameter_description"><p>a <a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-socket-client-get-socket-type.returns"></a><h4>Returns</h4>
<p> a <a class="link" href="GSocketAddress.html#GSocketFamily" title="enum GSocketFamily"><span class="type">GSocketFamily</span></a></p>
</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-socket-client-get-timeout"></a><h3>g_socket_client_get_timeout ()</h3>
<pre class="programlisting"><a href="../glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
g_socket_client_get_timeout (<em class="parameter"><code><a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> *client</code></em>);</pre>
<p>Gets the I/O timeout time for sockets created by <em class="parameter"><code>client</code></em>
.</p>
<p>See <a class="link" href="GSocketClient.html#g-socket-client-set-timeout" title="g_socket_client_set_timeout ()"><code class="function">g_socket_client_set_timeout()</code></a> for details.</p>
<div class="refsect3">
<a name="g-socket-client-get-timeout.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>client</p></td>
<td class="parameter_description"><p>a <a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-socket-client-get-timeout.returns"></a><h4>Returns</h4>
<p> the timeout in seconds</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-socket-client-get-enable-proxy"></a><h3>g_socket_client_get_enable_proxy ()</h3>
<pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
g_socket_client_get_enable_proxy (<em class="parameter"><code><a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> *client</code></em>);</pre>
<p>Gets the proxy enable state; see <a class="link" href="GSocketClient.html#g-socket-client-set-enable-proxy" title="g_socket_client_set_enable_proxy ()"><code class="function">g_socket_client_set_enable_proxy()</code></a></p>
<div class="refsect3">
<a name="g-socket-client-get-enable-proxy.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>client</p></td>
<td class="parameter_description"><p>a <a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-socket-client-get-enable-proxy.returns"></a><h4>Returns</h4>
<p> whether proxying is enabled</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-socket-client-get-proxy-resolver"></a><h3>g_socket_client_get_proxy_resolver ()</h3>
<pre class="programlisting"><a class="link" href="GProxyResolver.html" title="GProxyResolver"><span class="returnvalue">GProxyResolver</span></a> *
g_socket_client_get_proxy_resolver (<em class="parameter"><code><a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> *client</code></em>);</pre>
<p>Gets the <a class="link" href="GProxyResolver.html" title="GProxyResolver"><span class="type">GProxyResolver</span></a> being used by <em class="parameter"><code>client</code></em>
. Normally, this will
be the resolver returned by <a class="link" href="GProxyResolver.html#g-proxy-resolver-get-default" title="g_proxy_resolver_get_default ()"><code class="function">g_proxy_resolver_get_default()</code></a>, but you
can override it with <a class="link" href="GSocketClient.html#g-socket-client-set-proxy-resolver" title="g_socket_client_set_proxy_resolver ()"><code class="function">g_socket_client_set_proxy_resolver()</code></a>.</p>
<div class="refsect3">
<a name="g-socket-client-get-proxy-resolver.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>client</p></td>
<td class="parameter_description"><p>a <a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-socket-client-get-proxy-resolver.returns"></a><h4>Returns</h4>
<p> The <a class="link" href="GProxyResolver.html" title="GProxyResolver"><span class="type">GProxyResolver</span></a> being used by
<em class="parameter"><code>client</code></em>
. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-36.html#api-index-2.36">2.36</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-socket-client-get-tls"></a><h3>g_socket_client_get_tls ()</h3>
<pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
g_socket_client_get_tls (<em class="parameter"><code><a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> *client</code></em>);</pre>
<p>Gets whether <em class="parameter"><code>client</code></em>
creates TLS connections. See
<a class="link" href="GSocketClient.html#g-socket-client-set-tls" title="g_socket_client_set_tls ()"><code class="function">g_socket_client_set_tls()</code></a> for details.</p>
<div class="refsect3">
<a name="g-socket-client-get-tls.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>client</p></td>
<td class="parameter_description"><p>a <a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-socket-client-get-tls.returns"></a><h4>Returns</h4>
<p> whether <em class="parameter"><code>client</code></em>
uses TLS</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-28.html#api-index-2.28">2.28</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-socket-client-get-tls-validation-flags"></a><h3>g_socket_client_get_tls_validation_flags ()</h3>
<pre class="programlisting"><a class="link" href="gio-TLS-Overview.html#GTlsCertificateFlags" title="enum GTlsCertificateFlags"><span class="returnvalue">GTlsCertificateFlags</span></a>
g_socket_client_get_tls_validation_flags
(<em class="parameter"><code><a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> *client</code></em>);</pre>
<p>Gets the TLS validation flags used creating TLS connections via
<em class="parameter"><code>client</code></em>
.</p>
<div class="refsect3">
<a name="g-socket-client-get-tls-validation-flags.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>client</p></td>
<td class="parameter_description"><p>a <a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-socket-client-get-tls-validation-flags.returns"></a><h4>Returns</h4>
<p> the TLS validation flags</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-28.html#api-index-2.28">2.28</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-socket-client-add-application-proxy"></a><h3>g_socket_client_add_application_proxy ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_socket_client_add_application_proxy (<em class="parameter"><code><a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> *client</code></em>,
<em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *protocol</code></em>);</pre>
<p>Enable proxy protocols to be handled by the application. When the
indicated proxy protocol is returned by the <a class="link" href="GProxyResolver.html" title="GProxyResolver"><span class="type">GProxyResolver</span></a>,
<a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> will consider this protocol as supported but will
not try to find a <a class="link" href="GProxy.html" title="GProxy"><span class="type">GProxy</span></a> instance to handle handshaking. The
application must check for this case by calling
<a class="link" href="GSocketConnection.html#g-socket-connection-get-remote-address" title="g_socket_connection_get_remote_address ()"><code class="function">g_socket_connection_get_remote_address()</code></a> on the returned
<a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="type">GSocketConnection</span></a>, and seeing if it's a <a class="link" href="GProxyAddress.html" title="GProxyAddress"><span class="type">GProxyAddress</span></a> of the
appropriate type, to determine whether or not it needs to handle
the proxy handshaking itself.</p>
<p>This should be used for proxy protocols that are dialects of
another protocol such as HTTP proxy. It also allows cohabitation of
proxy protocols that are reused between protocols. A good example
is HTTP. It can be used to proxy HTTP, FTP and Gopher and can also
be use as generic socket proxy through the HTTP CONNECT method.</p>
<p>When the proxy is detected as being an application proxy, TLS handshake
will be skipped. This is required to let the application do the proxy
specific handshake.</p>
<div class="refsect3">
<a name="g-socket-client-add-application-proxy.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>client</p></td>
<td class="parameter_description"><p>a <a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>protocol</p></td>
<td class="parameter_description"><p>The proxy protocol</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="refsect1">
<a name="GSocketClient.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GSocketClient-struct"></a><h3>GSocketClient</h3>
<pre class="programlisting">typedef struct _GSocketClient GSocketClient;</pre>
<p>A helper class for network clients to make connections.</p>
<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="GSocketClientEvent"></a><h3>enum GSocketClientEvent</h3>
<p>Describes an event occurring on a <a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a>. See the
<a class="link" href="GSocketClient.html#GSocketClient-event" title="The “event” signal"><span class="type">“event”</span></a> signal for more details.</p>
<p>Additional values may be added to this type in the future.</p>
<div class="refsect3">
<a name="GSocketClientEvent.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="G-SOCKET-CLIENT-RESOLVING:CAPS"></a>G_SOCKET_CLIENT_RESOLVING</p></td>
<td class="enum_member_description">
<p>The client is doing a DNS lookup.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="G-SOCKET-CLIENT-RESOLVED:CAPS"></a>G_SOCKET_CLIENT_RESOLVED</p></td>
<td class="enum_member_description">
<p>The client has completed a DNS lookup.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="G-SOCKET-CLIENT-CONNECTING:CAPS"></a>G_SOCKET_CLIENT_CONNECTING</p></td>
<td class="enum_member_description">
<p>The client is connecting to a remote
host (either a proxy or the destination server).</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="G-SOCKET-CLIENT-CONNECTED:CAPS"></a>G_SOCKET_CLIENT_CONNECTED</p></td>
<td class="enum_member_description">
<p>The client has connected to a remote
host.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="G-SOCKET-CLIENT-PROXY-NEGOTIATING:CAPS"></a>G_SOCKET_CLIENT_PROXY_NEGOTIATING</p></td>
<td class="enum_member_description">
<p>The client is negotiating
with a proxy to connect to the destination server.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="G-SOCKET-CLIENT-PROXY-NEGOTIATED:CAPS"></a>G_SOCKET_CLIENT_PROXY_NEGOTIATED</p></td>
<td class="enum_member_description">
<p>The client has negotiated
with the proxy server.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="G-SOCKET-CLIENT-TLS-HANDSHAKING:CAPS"></a>G_SOCKET_CLIENT_TLS_HANDSHAKING</p></td>
<td class="enum_member_description">
<p>The client is performing a
TLS handshake.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="G-SOCKET-CLIENT-TLS-HANDSHAKED:CAPS"></a>G_SOCKET_CLIENT_TLS_HANDSHAKED</p></td>
<td class="enum_member_description">
<p>The client has performed a
TLS handshake.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="G-SOCKET-CLIENT-COMPLETE:CAPS"></a>G_SOCKET_CLIENT_COMPLETE</p></td>
<td class="enum_member_description">
<p>The client is done with a particular
<a class="link" href="GSocketConnectable.html" title="GSocketConnectable"><span class="type">GSocketConnectable</span></a>.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-32.html#api-index-2.32">2.32</a></p>
</div>
</div>
<div class="refsect1">
<a name="GSocketClient.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GSocketClient--enable-proxy"></a><h3>The <code class="literal">“enable-proxy”</code> property</h3>
<pre class="programlisting"> “enable-proxy” <a href="../glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
<p>Enable proxy support.</p>
<p>Flags: Read / Write / Construct</p>
<p>Default value: TRUE</p>
</div>
<hr>
<div class="refsect2">
<a name="GSocketClient--family"></a><h3>The <code class="literal">“family”</code> property</h3>
<pre class="programlisting"> “family” <a class="link" href="GSocketAddress.html#GSocketFamily" title="enum GSocketFamily"><span class="type">GSocketFamily</span></a></pre>
<p>The sockets address family to use for socket construction.</p>
<p>Flags: Read / Write / Construct</p>
<p>Default value: G_SOCKET_FAMILY_INVALID</p>
</div>
<hr>
<div class="refsect2">
<a name="GSocketClient--local-address"></a><h3>The <code class="literal">“local-address”</code> property</h3>
<pre class="programlisting"> “local-address” <a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="type">GSocketAddress</span></a> *</pre>
<p>The local address constructed sockets will be bound to.</p>
<p>Flags: Read / Write / Construct</p>
</div>
<hr>
<div class="refsect2">
<a name="GSocketClient--protocol"></a><h3>The <code class="literal">“protocol”</code> property</h3>
<pre class="programlisting"> “protocol” <a class="link" href="GSocket.html#GSocketProtocol" title="enum GSocketProtocol"><span class="type">GSocketProtocol</span></a></pre>
<p>The protocol to use for socket construction, or 0 for default.</p>
<p>Flags: Read / Write / Construct</p>
<p>Default value: G_SOCKET_PROTOCOL_DEFAULT</p>
</div>
<hr>
<div class="refsect2">
<a name="GSocketClient--proxy-resolver"></a><h3>The <code class="literal">“proxy-resolver”</code> property</h3>
<pre class="programlisting"> “proxy-resolver” <a class="link" href="GProxyResolver.html" title="GProxyResolver"><span class="type">GProxyResolver</span></a> *</pre>
<p>The proxy resolver to use</p>
<p>Flags: Read / Write / Construct</p>
<p class="since">Since: <a class="link" href="api-index-2-36.html#api-index-2.36">2.36</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GSocketClient--timeout"></a><h3>The <code class="literal">“timeout”</code> property</h3>
<pre class="programlisting"> “timeout” <a href="../glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
<p>The I/O timeout for sockets, or 0 for none.</p>
<p>Flags: Read / Write / Construct</p>
<p>Default value: 0</p>
</div>
<hr>
<div class="refsect2">
<a name="GSocketClient--tls"></a><h3>The <code class="literal">“tls”</code> property</h3>
<pre class="programlisting"> “tls” <a href="../glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
<p>Whether to create TLS connections.</p>
<p>Flags: Read / Write / Construct</p>
<p>Default value: FALSE</p>
</div>
<hr>
<div class="refsect2">
<a name="GSocketClient--tls-validation-flags"></a><h3>The <code class="literal">“tls-validation-flags”</code> property</h3>
<pre class="programlisting"> “tls-validation-flags” <a class="link" href="gio-TLS-Overview.html#GTlsCertificateFlags" title="enum GTlsCertificateFlags"><span class="type">GTlsCertificateFlags</span></a></pre>
<p>TLS validation flags to use.</p>
<p>Flags: Read / Write / Construct</p>
<p>Default value: G_TLS_CERTIFICATE_UNKNOWN_CA | G_TLS_CERTIFICATE_BAD_IDENTITY | G_TLS_CERTIFICATE_NOT_ACTIVATED | G_TLS_CERTIFICATE_EXPIRED | G_TLS_CERTIFICATE_REVOKED | G_TLS_CERTIFICATE_INSECURE | G_TLS_CERTIFICATE_GENERIC_ERROR</p>
</div>
<hr>
<div class="refsect2">
<a name="GSocketClient--type"></a><h3>The <code class="literal">“type”</code> property</h3>
<pre class="programlisting"> “type” <a class="link" href="GSocket.html#GSocketType" title="enum GSocketType"><span class="type">GSocketType</span></a></pre>
<p>The sockets type to use for socket construction.</p>
<p>Flags: Read / Write / Construct</p>
<p>Default value: G_SOCKET_TYPE_STREAM</p>
</div>
</div>
<div class="refsect1">
<a name="GSocketClient.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="GSocketClient-event"></a><h3>The <code class="literal">“event”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a> *client,
<a class="link" href="GSocketClient.html#GSocketClientEvent" title="enum GSocketClientEvent"><span class="type">GSocketClientEvent</span></a> event,
<a class="link" href="GSocketConnectable.html" title="GSocketConnectable"><span class="type">GSocketConnectable</span></a> *connectable,
<a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> *connection,
<a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre>
<p>Emitted when <em class="parameter"><code>client</code></em>
's activity on <em class="parameter"><code>connectable</code></em>
changes state.
Among other things, this can be used to provide progress
information about a network connection in the UI. The meanings of
the different <em class="parameter"><code>event</code></em>
values are as follows:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p><a class="link" href="GSocketClient.html#G-SOCKET-CLIENT-RESOLVING:CAPS"><code class="literal">G_SOCKET_CLIENT_RESOLVING</code></a>: <em class="parameter"><code>client</code></em>
is about to look up <em class="parameter"><code>connectable</code></em>
in DNS. <em class="parameter"><code>connection</code></em>
will be <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></li>
<li class="listitem"><p><a class="link" href="GSocketClient.html#G-SOCKET-CLIENT-RESOLVED:CAPS"><code class="literal">G_SOCKET_CLIENT_RESOLVED</code></a>: <em class="parameter"><code>client</code></em>
has successfully resolved
<em class="parameter"><code>connectable</code></em>
in DNS. <em class="parameter"><code>connection</code></em>
will be <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></li>
<li class="listitem"><p><a class="link" href="GSocketClient.html#G-SOCKET-CLIENT-CONNECTING:CAPS"><code class="literal">G_SOCKET_CLIENT_CONNECTING</code></a>: <em class="parameter"><code>client</code></em>
is about to make a connection
to a remote host; either a proxy server or the destination server
itself. <em class="parameter"><code>connection</code></em>
is the <a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="type">GSocketConnection</span></a>, which is not yet
connected. Since GLib 2.40, you can access the remote
address via <a class="link" href="GSocketConnection.html#g-socket-connection-get-remote-address" title="g_socket_connection_get_remote_address ()"><code class="function">g_socket_connection_get_remote_address()</code></a>.</p></li>
<li class="listitem"><p><a class="link" href="GSocketClient.html#G-SOCKET-CLIENT-CONNECTED:CAPS"><code class="literal">G_SOCKET_CLIENT_CONNECTED</code></a>: <em class="parameter"><code>client</code></em>
has successfully connected
to a remote host. <em class="parameter"><code>connection</code></em>
is the connected <a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="type">GSocketConnection</span></a>.</p></li>
<li class="listitem"><p><a class="link" href="GSocketClient.html#G-SOCKET-CLIENT-PROXY-NEGOTIATING:CAPS"><code class="literal">G_SOCKET_CLIENT_PROXY_NEGOTIATING</code></a>: <em class="parameter"><code>client</code></em>
is about to negotiate
with a proxy to get it to connect to <em class="parameter"><code>connectable</code></em>
. <em class="parameter"><code>connection</code></em>
is
the <a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="type">GSocketConnection</span></a> to the proxy server.</p></li>
<li class="listitem"><p><a class="link" href="GSocketClient.html#G-SOCKET-CLIENT-PROXY-NEGOTIATED:CAPS"><code class="literal">G_SOCKET_CLIENT_PROXY_NEGOTIATED</code></a>: <em class="parameter"><code>client</code></em>
has negotiated a
connection to <em class="parameter"><code>connectable</code></em>
through a proxy server. <em class="parameter"><code>connection</code></em>
is
the stream returned from <a class="link" href="GProxy.html#g-proxy-connect" title="g_proxy_connect ()"><code class="function">g_proxy_connect()</code></a>, which may or may not
be a <a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="type">GSocketConnection</span></a>.</p></li>
<li class="listitem"><p><a class="link" href="GSocketClient.html#G-SOCKET-CLIENT-TLS-HANDSHAKING:CAPS"><code class="literal">G_SOCKET_CLIENT_TLS_HANDSHAKING</code></a>: <em class="parameter"><code>client</code></em>
is about to begin a TLS
handshake. <em class="parameter"><code>connection</code></em>
is a <a class="link" href="GTlsClientConnection.html" title="GTlsClientConnection"><span class="type">GTlsClientConnection</span></a>.</p></li>
<li class="listitem"><p><a class="link" href="GSocketClient.html#G-SOCKET-CLIENT-TLS-HANDSHAKED:CAPS"><code class="literal">G_SOCKET_CLIENT_TLS_HANDSHAKED</code></a>: <em class="parameter"><code>client</code></em>
has successfully completed
the TLS handshake. <em class="parameter"><code>connection</code></em>
is a <a class="link" href="GTlsClientConnection.html" title="GTlsClientConnection"><span class="type">GTlsClientConnection</span></a>.</p></li>
<li class="listitem"><p><a class="link" href="GSocketClient.html#G-SOCKET-CLIENT-COMPLETE:CAPS"><code class="literal">G_SOCKET_CLIENT_COMPLETE</code></a>: <em class="parameter"><code>client</code></em>
has either successfully connected
to <em class="parameter"><code>connectable</code></em>
(in which case <em class="parameter"><code>connection</code></em>
is the <a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="type">GSocketConnection</span></a>
that it will be returning to the caller) or has failed (in which
case <em class="parameter"><code>connection</code></em>
is <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> and the client is about to return an error).</p></li>
</ul></div>
<p>Each event except <a class="link" href="GSocketClient.html#G-SOCKET-CLIENT-COMPLETE:CAPS"><code class="literal">G_SOCKET_CLIENT_COMPLETE</code></a> may be emitted
multiple times (or not at all) for a given connectable (in
particular, if <em class="parameter"><code>client</code></em>
ends up attempting to connect to more than
one address). However, if <em class="parameter"><code>client</code></em>
emits the <a class="link" href="GSocketClient.html#GSocketClient-event" title="The “event” signal"><span class="type">“event”</span></a>
signal at all for a given connectable, that it will always emit
it with <a class="link" href="GSocketClient.html#G-SOCKET-CLIENT-COMPLETE:CAPS"><code class="literal">G_SOCKET_CLIENT_COMPLETE</code></a> when it is done.</p>
<p>Note that there may be additional <a class="link" href="GSocketClient.html#GSocketClientEvent" title="enum GSocketClientEvent"><span class="type">GSocketClientEvent</span></a> values in
the future; unrecognized <em class="parameter"><code>event</code></em>
values should be ignored.</p>
<div class="refsect3">
<a name="GSocketClient-event.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>client</p></td>
<td class="parameter_description"><p>the <a class="link" href="GSocketClient.html" title="GSocketClient"><span class="type">GSocketClient</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>event</p></td>
<td class="parameter_description"><p>the event that is occurring</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>connectable</p></td>
<td class="parameter_description"><p>the <a class="link" href="GSocketConnectable.html" title="GSocketConnectable"><span class="type">GSocketConnectable</span></a> that <em class="parameter"><code>event</code></em>
is occurring on</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>connection</p></td>
<td class="parameter_description"><p> the current representation of the connection. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p>Flags: <a href="../gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p>
<p class="since">Since: <a class="link" href="api-index-2-32.html#api-index-2.32">2.32</a></p>
</div>
</div>
<div class="refsect1">
<a name="GSocketClient.see-also"></a><h2>See Also</h2>
<p><a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="type">GSocketConnection</span></a>, <a class="link" href="GSocketListener.html" title="GSocketListener"><span class="type">GSocketListener</span></a></p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25.1</div>
</body>
</html>