⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.10
Server IP:
157.245.101.34
Server:
Linux skvinfotech-website 5.4.0-131-generic #147-Ubuntu SMP Fri Oct 14 17:07:22 UTC 2022 x86_64
Server Software:
Apache/2.4.41 (Ubuntu)
PHP Version:
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
proc
/
self
/
root
/
usr
/
share
/
doc
/
libglib2.0-doc
/
gio
/
View File Name :
GSocketAddressEnumerator.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>GSocketAddressEnumerator: 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="resolver.html" title="DNS resolution"> <link rel="prev" href="GSocketConnectable.html" title="GSocketConnectable"> <link rel="next" href="GProxyAddressEnumerator.html" title="GProxyAddressEnumerator"> <meta name="generator" content="GTK-Doc V1.32 (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="#GSocketAddressEnumerator.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> <a href="#GSocketAddressEnumerator.object-hierarchy" class="shortcut">Object Hierarchy</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="resolver.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> <td><a accesskey="p" href="GSocketConnectable.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> <td><a accesskey="n" href="GProxyAddressEnumerator.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> </tr></table> <div class="refentry"> <a name="GSocketAddressEnumerator"></a><div class="titlepage"></div> <div class="refnamediv"><table width="100%"><tr> <td valign="top"> <h2><span class="refentrytitle"><a name="GSocketAddressEnumerator.top_of_page"></a>GSocketAddressEnumerator</span></h2> <p>GSocketAddressEnumerator — Enumerator for socket addresses</p> </td> <td class="gallery_image" valign="top" align="right"></td> </tr></table></div> <div class="refsect1"> <a name="GSocketAddressEnumerator.functions"></a><h2>Functions</h2> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="functions_proto_type"> <col class="functions_proto_name"> </colgroup> <tbody> <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="GSocketAddressEnumerator.html#g-socket-address-enumerator-next" title="g_socket_address_enumerator_next ()">g_socket_address_enumerator_next</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="GSocketAddressEnumerator.html#g-socket-address-enumerator-next-async" title="g_socket_address_enumerator_next_async ()">g_socket_address_enumerator_next_async</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="GSocketAddressEnumerator.html#g-socket-address-enumerator-next-finish" title="g_socket_address_enumerator_next_finish ()">g_socket_address_enumerator_next_finish</a> <span class="c_punctuation">()</span> </td> </tr> </tbody> </table></div> </div> <div class="refsect1"> <a name="GSocketAddressEnumerator.other"></a><h2>Types and Values</h2> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="other_proto_type"> <col class="other_proto_name"> </colgroup> <tbody> <tr> <td class="datatype_keyword"> </td> <td class="function_name"><a class="link" href="GSocketAddressEnumerator.html#GSocketAddressEnumerator-struct" title="GSocketAddressEnumerator">GSocketAddressEnumerator</a></td> </tr> <tr> <td class="datatype_keyword">struct</td> <td class="function_name"><a class="link" href="GSocketAddressEnumerator.html#GSocketAddressEnumeratorClass" title="struct GSocketAddressEnumeratorClass">GSocketAddressEnumeratorClass</a></td> </tr> </tbody> </table></div> </div> <div class="refsect1"> <a name="GSocketAddressEnumerator.object-hierarchy"></a><h2>Object Hierarchy</h2> <pre class="screen"> GObject <span class="lineart">╰──</span> GSocketAddressEnumerator <span class="lineart">╰──</span> <a class="link" href="GProxyAddressEnumerator.html" title="GProxyAddressEnumerator">GProxyAddressEnumerator</a> </pre> </div> <div class="refsect1"> <a name="GSocketAddressEnumerator.includes"></a><h2>Includes</h2> <pre class="synopsis">#include <gio/gio.h> </pre> </div> <div class="refsect1"> <a name="GSocketAddressEnumerator.description"></a><h2>Description</h2> <p><a class="link" href="GSocketAddressEnumerator.html" title="GSocketAddressEnumerator"><span class="type">GSocketAddressEnumerator</span></a> is an enumerator type for <a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="type">GSocketAddress</span></a> instances. It is returned by enumeration functions such as <a class="link" href="GSocketConnectable.html#g-socket-connectable-enumerate" title="g_socket_connectable_enumerate ()"><code class="function">g_socket_connectable_enumerate()</code></a>, which returns a <a class="link" href="GSocketAddressEnumerator.html" title="GSocketAddressEnumerator"><span class="type">GSocketAddressEnumerator</span></a> to list each <a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="type">GSocketAddress</span></a> which could be used to connect to that <a class="link" href="GSocketConnectable.html" title="GSocketConnectable"><span class="type">GSocketConnectable</span></a>.</p> <p>Enumeration is typically a blocking operation, so the asynchronous methods <a class="link" href="GSocketAddressEnumerator.html#g-socket-address-enumerator-next-async" title="g_socket_address_enumerator_next_async ()"><code class="function">g_socket_address_enumerator_next_async()</code></a> and <a class="link" href="GSocketAddressEnumerator.html#g-socket-address-enumerator-next-finish" title="g_socket_address_enumerator_next_finish ()"><code class="function">g_socket_address_enumerator_next_finish()</code></a> should be used where possible.</p> <p>Each <a class="link" href="GSocketAddressEnumerator.html" title="GSocketAddressEnumerator"><span class="type">GSocketAddressEnumerator</span></a> can only be enumerated once. Once <a class="link" href="GSocketAddressEnumerator.html#g-socket-address-enumerator-next" title="g_socket_address_enumerator_next ()"><code class="function">g_socket_address_enumerator_next()</code></a> has returned <code class="literal">NULL</code> (and no error), further enumeration with that <a class="link" href="GSocketAddressEnumerator.html" title="GSocketAddressEnumerator"><span class="type">GSocketAddressEnumerator</span></a> is not possible, and it can be unreffed.</p> </div> <div class="refsect1"> <a name="GSocketAddressEnumerator.functions_details"></a><h2>Functions</h2> <div class="refsect2"> <a name="g-socket-address-enumerator-next"></a><h3>g_socket_address_enumerator_next ()</h3> <pre class="programlisting"><a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="returnvalue">GSocketAddress</span></a> * g_socket_address_enumerator_next (<em class="parameter"><code><a class="link" href="GSocketAddressEnumerator.html" title="GSocketAddressEnumerator"><span class="type">GSocketAddressEnumerator</span></a> *enumerator</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><span class="type">GError</span> **error</code></em>);</pre> <p>Retrieves the next <a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="type">GSocketAddress</span></a> from <em class="parameter"><code>enumerator</code></em> . Note that this may block for some amount of time. (Eg, a <a class="link" href="GNetworkAddress.html" title="GNetworkAddress"><span class="type">GNetworkAddress</span></a> may need to do a DNS lookup before it can return an address.) Use <a class="link" href="GSocketAddressEnumerator.html#g-socket-address-enumerator-next-async" title="g_socket_address_enumerator_next_async ()"><code class="function">g_socket_address_enumerator_next_async()</code></a> if you need to avoid blocking.</p> <p>If <em class="parameter"><code>enumerator</code></em> is expected to yield addresses, but for some reason is unable to (eg, because of a DNS error), then the first call to <a class="link" href="GSocketAddressEnumerator.html#g-socket-address-enumerator-next" title="g_socket_address_enumerator_next ()"><code class="function">g_socket_address_enumerator_next()</code></a> will return an appropriate error in *<em class="parameter"><code>error</code></em> . However, if the first call to <a class="link" href="GSocketAddressEnumerator.html#g-socket-address-enumerator-next" title="g_socket_address_enumerator_next ()"><code class="function">g_socket_address_enumerator_next()</code></a> succeeds, then any further internal errors (other than <em class="parameter"><code>cancellable</code></em> being triggered) will be ignored.</p> <div class="refsect3"> <a name="g-socket-address-enumerator-next.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>enumerator</p></td> <td class="parameter_description"><p>a <a class="link" href="GSocketAddressEnumerator.html" title="GSocketAddressEnumerator"><span class="type">GSocketAddressEnumerator</span></a></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, <code class="literal">NULL</code> to ignore. </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>error</p></td> <td class="parameter_description"><p>a <span class="type">GError</span>.</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="g-socket-address-enumerator-next.returns"></a><h4>Returns</h4> <p>a <a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="type">GSocketAddress</span></a> (owned by the caller), or <code class="literal">NULL</code> on error (in which case *<em class="parameter"><code>error</code></em> will be set) or if there are no more addresses. </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-address-enumerator-next-async"></a><h3>g_socket_address_enumerator_next_async ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> g_socket_address_enumerator_next_async (<em class="parameter"><code><a class="link" href="GSocketAddressEnumerator.html" title="GSocketAddressEnumerator"><span class="type">GSocketAddressEnumerator</span></a> *enumerator</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><span class="type">gpointer</span> user_data</code></em>);</pre> <p>Asynchronously retrieves the next <a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="type">GSocketAddress</span></a> from <em class="parameter"><code>enumerator</code></em> and then calls <em class="parameter"><code>callback</code></em> , which must call <a class="link" href="GSocketAddressEnumerator.html#g-socket-address-enumerator-next-finish" title="g_socket_address_enumerator_next_finish ()"><code class="function">g_socket_address_enumerator_next_finish()</code></a> to get the result.</p> <p>It is an error to call this multiple times before the previous callback has finished.</p> <div class="refsect3"> <a name="g-socket-address-enumerator-next-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>enumerator</p></td> <td class="parameter_description"><p>a <a class="link" href="GSocketAddressEnumerator.html" title="GSocketAddressEnumerator"><span class="type">GSocketAddressEnumerator</span></a></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, <code class="literal">NULL</code> to ignore. </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>callback</p></td> <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call when the request is satisfied. </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>the data to pass to callback function. </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> </div> <hr> <div class="refsect2"> <a name="g-socket-address-enumerator-next-finish"></a><h3>g_socket_address_enumerator_next_finish ()</h3> <pre class="programlisting"><a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="returnvalue">GSocketAddress</span></a> * g_socket_address_enumerator_next_finish (<em class="parameter"><code><a class="link" href="GSocketAddressEnumerator.html" title="GSocketAddressEnumerator"><span class="type">GSocketAddressEnumerator</span></a> *enumerator</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><span class="type">GError</span> **error</code></em>);</pre> <p>Retrieves the result of a completed call to <a class="link" href="GSocketAddressEnumerator.html#g-socket-address-enumerator-next-async" title="g_socket_address_enumerator_next_async ()"><code class="function">g_socket_address_enumerator_next_async()</code></a>. See <a class="link" href="GSocketAddressEnumerator.html#g-socket-address-enumerator-next" title="g_socket_address_enumerator_next ()"><code class="function">g_socket_address_enumerator_next()</code></a> for more information about error handling.</p> <div class="refsect3"> <a name="g-socket-address-enumerator-next-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>enumerator</p></td> <td class="parameter_description"><p>a <a class="link" href="GSocketAddressEnumerator.html" title="GSocketAddressEnumerator"><span class="type">GSocketAddressEnumerator</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 <span class="type">GError</span></p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="g-socket-address-enumerator-next-finish.returns"></a><h4>Returns</h4> <p>a <a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="type">GSocketAddress</span></a> (owned by the caller), or <code class="literal">NULL</code> on error (in which case *<em class="parameter"><code>error</code></em> will be set) or if there are no more addresses. </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> </div> <div class="refsect1"> <a name="GSocketAddressEnumerator.other_details"></a><h2>Types and Values</h2> <div class="refsect2"> <a name="GSocketAddressEnumerator-struct"></a><h3>GSocketAddressEnumerator</h3> <pre class="programlisting">typedef struct _GSocketAddressEnumerator GSocketAddressEnumerator;</pre> <p>Enumerator type for objects that contain or generate <a class="link" href="GSocketAddress.html" title="GSocketAddress"><span class="type">GSocketAddress</span></a> instances.</p> </div> <hr> <div class="refsect2"> <a name="GSocketAddressEnumeratorClass"></a><h3>struct GSocketAddressEnumeratorClass</h3> <pre class="programlisting">struct GSocketAddressEnumeratorClass { /* Virtual Table */ GSocketAddress * (* next) (GSocketAddressEnumerator *enumerator, GCancellable *cancellable, GError **error); void (* next_async) (GSocketAddressEnumerator *enumerator, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); GSocketAddress * (* next_finish) (GSocketAddressEnumerator *enumerator, GAsyncResult *result, GError **error); }; </pre> <p>Class structure for <a class="link" href="GSocketAddressEnumerator.html" title="GSocketAddressEnumerator"><span class="type">GSocketAddressEnumerator</span></a>.</p> <div class="refsect3"> <a name="GSocketAddressEnumeratorClass.members"></a><h4>Members</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="300px" class="struct_members_name"> <col class="struct_members_description"> <col width="200px" class="struct_members_annotations"> </colgroup> <tbody> <tr> <td class="struct_member_name"><p><em class="structfield"><code><a name="GSocketAddressEnumeratorClass.next"></a>next</code></em> ()</p></td> <td class="struct_member_description"><p>Virtual method for <a class="link" href="GSocketAddressEnumerator.html#g-socket-address-enumerator-next" title="g_socket_address_enumerator_next ()"><code class="function">g_socket_address_enumerator_next()</code></a>.</p></td> <td class="struct_member_annotations"> </td> </tr> <tr> <td class="struct_member_name"><p><em class="structfield"><code><a name="GSocketAddressEnumeratorClass.next-async"></a>next_async</code></em> ()</p></td> <td class="struct_member_description"><p>Virtual method for <a class="link" href="GSocketAddressEnumerator.html#g-socket-address-enumerator-next-async" title="g_socket_address_enumerator_next_async ()"><code class="function">g_socket_address_enumerator_next_async()</code></a>.</p></td> <td class="struct_member_annotations"> </td> </tr> <tr> <td class="struct_member_name"><p><em class="structfield"><code><a name="GSocketAddressEnumeratorClass.next-finish"></a>next_finish</code></em> ()</p></td> <td class="struct_member_description"><p>Virtual method for <a class="link" href="GSocketAddressEnumerator.html#g-socket-address-enumerator-next-finish" title="g_socket_address_enumerator_next_finish ()"><code class="function">g_socket_address_enumerator_next_finish()</code></a>.</p></td> <td class="struct_member_annotations"> </td> </tr> </tbody> </table></div> </div> </div> </div> </div> <div class="footer"> <hr>Generated by GTK-Doc V1.32</div> </body> </html>