~ubuntu-branches/ubuntu/trusty/glibmm2.4/trusty-proposed

« back to all changes in this revision

Viewing changes to docs/reference/html/classGio_1_1Socket.html

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher
  • Date: 2014-04-07 13:47:09 UTC
  • mfrom: (1.2.87)
  • Revision ID: package-import@ubuntu.com-20140407134709-wlrea1wrtuy9kpzw
Tags: 2.39.93-0ubuntu1
New upstream version

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 <tr style="height: 56px;">
19
19
  <td style="padding-left: 0.5em;">
20
20
   <div id="projectname">glibmm
21
 
   &#160;<span id="projectnumber">2.39.4</span>
 
21
   &#160;<span id="projectnumber">2.39.93</span>
22
22
   </div>
23
23
  </td>
24
24
 </tr>
91
91
<tr class="memdesc:a16044bba5924c183cff90f0a4cf47394"><td class="mdescLeft">&#160;</td><td class="mdescRight">When a socket is created it is attached to an address family, but it doesn't have an address in this family.  <a href="#a16044bba5924c183cff90f0a4cf47394">More...</a><br/></td></tr>
92
92
<tr class="separator:a16044bba5924c183cff90f0a4cf47394"><td class="memSeparator" colspan="2">&#160;</td></tr>
93
93
<tr class="memitem:af16eed3fd42f3769b5e608f96db214fd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1Socket.html#af16eed3fd42f3769b5e608f96db214fd">listen</a> ()</td></tr>
94
 
<tr class="memdesc:af16eed3fd42f3769b5e608f96db214fd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Marks the socket as a server socket, i.e. a socket that is used to accept incoming requests using g_socket_accept().  <a href="#af16eed3fd42f3769b5e608f96db214fd">More...</a><br/></td></tr>
 
94
<tr class="memdesc:af16eed3fd42f3769b5e608f96db214fd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Marks the socket as a server socket - a socket that is used to accept incoming requests using <a class="el" href="classGio_1_1Socket.html#a4b6c036db4e484e6b7f0419962254888" title="A accept() convenience overload. ">Socket::accept()</a>.  <a href="#af16eed3fd42f3769b5e608f96db214fd">More...</a><br/></td></tr>
95
95
<tr class="separator:af16eed3fd42f3769b5e608f96db214fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
96
96
<tr class="memitem:a137ae34a8f211eaed11f9a58ca6b3f5e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>&lt; <a class="el" href="classGio_1_1Socket.html">Socket</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1Socket.html#a137ae34a8f211eaed11f9a58ca6b3f5e">accept</a> (const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>&lt; <a class="el" href="classGio_1_1Cancellable.html">Cancellable</a> &gt;&amp; cancellable)</td></tr>
97
97
<tr class="memdesc:a137ae34a8f211eaed11f9a58ca6b3f5e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Accept incoming connections on a connection-based socket.  <a href="#a137ae34a8f211eaed11f9a58ca6b3f5e">More...</a><br/></td></tr>
217
217
<tr class="memitem:ad350079b590c05387736a0fd21e6e0ec"><td class="memItemLeft" align="right" valign="top">gssize&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1Socket.html#ad350079b590c05387736a0fd21e6e0ec">send_with_blocking</a> (gchar* buffer, gsize <a class="elRef" doxygen="/opt/gnome/share/mm-common/doctags/libstdc++.tag:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01651.html#ga445a43f417432dd1b9aed90ef239c700">size</a>, bool blocking, const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>&lt; <a class="el" href="classGio_1_1Cancellable.html">Cancellable</a> &gt;&amp; cancellable=<a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>&lt; <a class="el" href="classGio_1_1Cancellable.html">Cancellable</a> &gt;())</td></tr>
218
218
<tr class="memdesc:ad350079b590c05387736a0fd21e6e0ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">This behaves exactly the same as g_socket_send(), except that the choice of blocking or non-blocking behavior is determined by the <em>blocking</em> argument rather than by <em>socket's</em> properties.  <a href="#ad350079b590c05387736a0fd21e6e0ec">More...</a><br/></td></tr>
219
219
<tr class="separator:ad350079b590c05387736a0fd21e6e0ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
 
220
<tr class="memitem:ae797a60397ec1035d07e625cc3bc423c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1Socket.html#ae797a60397ec1035d07e625cc3bc423c">get_option</a> (int level, int optname, int&amp; value) const </td></tr>
 
221
<tr class="memdesc:ae797a60397ec1035d07e625cc3bc423c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the value of an integer-valued option on <em>socket</em>, as with getsockopt().  <a href="#ae797a60397ec1035d07e625cc3bc423c">More...</a><br/></td></tr>
 
222
<tr class="separator:ae797a60397ec1035d07e625cc3bc423c"><td class="memSeparator" colspan="2">&#160;</td></tr>
 
223
<tr class="memitem:a13116c8ad9db97e3c04a370a8a7ec7d3"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1Socket.html#a13116c8ad9db97e3c04a370a8a7ec7d3">set_option</a> (int level, int optname, int value)</td></tr>
 
224
<tr class="memdesc:a13116c8ad9db97e3c04a370a8a7ec7d3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the value of an integer-valued option on <em>socket</em>, as with setsockopt().  <a href="#a13116c8ad9db97e3c04a370a8a7ec7d3">More...</a><br/></td></tr>
 
225
<tr class="separator:a13116c8ad9db97e3c04a370a8a7ec7d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
220
226
<tr class="memitem:a8161abb1b8367aed9502d48be2d94172"><td class="memItemLeft" align="right" valign="top">guint&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1Socket.html#a8161abb1b8367aed9502d48be2d94172">get_ttl</a> () const </td></tr>
221
227
<tr class="memdesc:a8161abb1b8367aed9502d48be2d94172"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the unicast time-to-live setting on <em>socket</em>; see g_socket_set_ttl() for more details.  <a href="#a8161abb1b8367aed9502d48be2d94172">More...</a><br/></td></tr>
222
228
<tr class="separator:a8161abb1b8367aed9502d48be2d94172"><td class="memSeparator" colspan="2">&#160;</td></tr>
622
628
</div><div class="memdoc">
623
629
 
624
630
<p>Accept incoming connections on a connection-based socket. </p>
625
 
<p>This removes the first outstanding connection request from the listening socket and creates a <a class="el" href="classGio_1_1Socket.html" title="Low-level socket object. ">Socket</a> object for it.</p>
626
 
<p>The <em>socket</em> must be bound to a local address with g_socket_bind() and must be listening for incoming connections (g_socket_listen()).</p>
627
 
<p>If there are no outstanding connections then the operation will block or return IO_ERROR_WOULD_BLOCK if non-blocking I/O is enabled. To be notified of an incoming connection, wait for the IO_IN condition.</p>
628
 
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000096">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
 
631
<p>This removes the first outstanding connection request from the listening socket and creates a GSocket object for it.</p>
 
632
<p>The socket must be bound to a local address with g_socket_bind() and must be listening for incoming connections (<a class="el" href="classGio_1_1Socket.html#af16eed3fd42f3769b5e608f96db214fd" title="Marks the socket as a server socket - a socket that is used to accept incoming requests using Socket:...">Socket::listen()</a>).</p>
 
633
<p>If there are no outstanding connections then the operation will block or throw <a class="el" href="classGio_1_1Error.html" title="Exception class for giomm errors. ">Gio::Error</a> with ERROR_WOULD_BLOCK if non-blocking I/O is enabled. To be notified of an incoming connection, wait for the <a class="el" href="namespaceGlib.html#gabd96381793b70d4ae32c725926990918aa38ee764d957d52ccd85688c27778daf" title="A bitwise combination representing an I/O condition to watch for on an event source. ">Glib::IO_IN</a> condition.</p>
629
634
<dl class="params"><dt>Parameters</dt><dd>
630
635
  <table class="params">
631
 
    <tr><td class="paramname">cancellable</td><td>A <a class="el" href="classGio_1_1Cancellable.html" title="Allows actions to be cancelled. ">Cancellable</a> or <code>0</code>. </td></tr>
632
 
  </table>
633
 
  </dd>
634
 
</dl>
635
 
<dl class="section return"><dt>Returns</dt><dd>A new <a class="el" href="classGio_1_1Socket.html" title="Low-level socket object. ">Socket</a>, or <code>0</code> on error. Free the returned object with Glib::object_unref(). </dd></dl>
 
636
    <tr><td class="paramname">cancellable</td><td>A <a class="el" href="classGio_1_1Cancellable.html" title="Allows actions to be cancelled. ">Cancellable</a> object which can be used to cancel the operation.</td></tr>
 
637
  </table>
 
638
  </dd>
 
639
</dl>
 
640
<dl class="section return"><dt>Returns</dt><dd>a <a class="el" href="classGio_1_1Socket.html" title="Low-level socket object. ">Gio::Socket</a></dd></dl>
 
641
<dl class="exception"><dt>Exceptions</dt><dd>
 
642
  <table class="exception">
 
643
    <tr><td class="paramname"><a class="el" href="classGio_1_1Error.html" title="Exception class for giomm errors. ">Gio::Error</a></td><td></td></tr>
 
644
  </table>
 
645
  </dd>
 
646
</dl>
636
647
 
637
648
</div>
638
649
</div>
678
689
</div><div class="memdoc">
679
690
 
680
691
<p>When a socket is created it is attached to an address family, but it doesn't have an address in this family. </p>
681
 
<p>g_socket_bind() assigns the address (sometimes called name) of the socket.</p>
682
 
<p>It is generally required to bind to a local address before you can receive connections. (See g_socket_listen() and g_socket_accept() ). In certain situations, you may also want to bind a socket that will be used to initiate connections, though this is not normally required.</p>
683
 
<p>If <em>socket</em> is a TCP socket, then <em>allow_reuse</em> controls the setting of the <code>SO_REUSEADDR</code> socket option; normally it should be <code>true</code> for server sockets (sockets that you will eventually call g_socket_accept() on), and <code>false</code> for client sockets. (Failing to set this flag on a server socket may cause g_socket_bind() to return IO_ERROR_ADDRESS_IN_USE if the server program is stopped and then immediately restarted.)</p>
684
 
<p>If <em>socket</em> is a UDP socket, then <em>allow_reuse</em> determines whether or not other UDP sockets can be bound to the same address at the same time. In particular, you can have several UDP sockets bound to the same address, and they will all receive all of the multicast and broadcast packets sent to that address. (The behavior of unicast UDP packets to an address with multiple listeners is not defined.)</p>
685
 
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000094">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
 
692
<p><a class="el" href="classGio_1_1Socket.html#a16044bba5924c183cff90f0a4cf47394" title="When a socket is created it is attached to an address family, but it doesn&#39;t have an address in this ...">Socket::bind()</a> assigns the address (sometimes called name) of the socket.</p>
 
693
<p>It is generally required to bind to a local address before you can receive connections. (See <a class="el" href="classGio_1_1Socket.html#af16eed3fd42f3769b5e608f96db214fd" title="Marks the socket as a server socket - a socket that is used to accept incoming requests using Socket:...">Socket::listen()</a> and <a class="el" href="classGio_1_1Socket.html#a4b6c036db4e484e6b7f0419962254888" title="A accept() convenience overload. ">Socket::accept()</a>). In certain situations, you may also want to bind a socket that will be used to initiate connections, though this is not normally required.</p>
 
694
<p>If socket is a TCP socket, then <em>allow_reuse</em> controls the setting of the SO_REUSEADDR socket option; normally it should be <code>true</code> for server sockets (sockets that you will eventually call <a class="el" href="classGio_1_1Socket.html#a4b6c036db4e484e6b7f0419962254888" title="A accept() convenience overload. ">Socket::accept()</a> on), and <code>false</code> for client sockets. (Failing to set this flag on a server socket may cause <a class="el" href="classGio_1_1Socket.html#a16044bba5924c183cff90f0a4cf47394" title="When a socket is created it is attached to an address family, but it doesn&#39;t have an address in this ...">Socket::bind()</a> to throw <a class="el" href="classGio_1_1Error.html" title="Exception class for giomm errors. ">Gio::Error</a> with ADDRESS_IN_USE if the server program is stopped and then immediately restarted.)</p>
 
695
<p>If socket is a UDP socket, then <em>allow_reuse</em> determines whether or not other UDP sockets can be bound to the same address at the same time. In particular, you can have several UDP sockets bound to the same address, and they will all receive all of the multicast and broadcast packets sent to that address. (The behavior of unicast UDP packets to an address with multiple listeners is not defined.)</p>
686
696
<dl class="params"><dt>Parameters</dt><dd>
687
697
  <table class="params">
688
 
    <tr><td class="paramname">address</td><td>A <a class="el" href="classGio_1_1SocketAddress.html" title="Abstract base class representing endpoints for socket communication. ">SocketAddress</a> specifying the local address. </td></tr>
689
 
    <tr><td class="paramname">allow_reuse</td><td>Whether to allow reusing this address. </td></tr>
690
 
  </table>
691
 
  </dd>
692
 
</dl>
693
 
<dl class="section return"><dt>Returns</dt><dd><code>true</code> on success, <code>false</code> on error. </dd></dl>
 
698
    <tr><td class="paramname">address</td><td>a <a class="el" href="classGio_1_1SocketAddress.html" title="Abstract base class representing endpoints for socket communication. ">SocketAddress</a> specifying the local address. </td></tr>
 
699
    <tr><td class="paramname">allow_reuse</td><td>whether to allow reusing this address</td></tr>
 
700
  </table>
 
701
  </dd>
 
702
</dl>
 
703
<dl class="exception"><dt>Exceptions</dt><dd>
 
704
  <table class="exception">
 
705
    <tr><td class="paramname"><a class="el" href="classGio_1_1Error.html" title="Exception class for giomm errors. ">Gio::Error</a></td><td></td></tr>
 
706
  </table>
 
707
  </dd>
 
708
</dl>
694
709
 
695
710
</div>
696
711
</div>
709
724
 
710
725
<p>Checks and resets the pending connect error for the socket. </p>
711
726
<p>This is used to check for errors when g_socket_connect() is used in non-blocking mode.</p>
712
 
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000098">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
 
727
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000094">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
713
728
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if no error, <code>false</code> otherwise, setting <em>error</em> to the error. </dd></dl>
714
729
 
715
730
</div>
732
747
<p>Once the socket is closed, all other operations will return IO_ERROR_CLOSED. Closing a socket multiple times will not return an error.</p>
733
748
<p>Sockets will be automatically closed when the last reference is dropped, but you might want to call this function to make sure resources are released as early as possible.</p>
734
749
<p>Beware that due to the way that TCP works, it is possible for recently-sent data to be lost if either you close a socket while the IO_IN condition is set, or else if the remote connection tries to send something to you after you close the socket but before it has finished reading all of the data you sent. There is no easy generic way to avoid this problem; the easiest fix is to design the network protocol such that the client will never send data "out of turn". Another solution is for the server to half-close the connection by calling g_socket_shutdown() with only the <em>shutdown_write</em> flag set, and then wait for the client to notice this and close its side of the connection, after which the server can safely call g_socket_close(). (This is what <a class="el" href="classGio_1_1TcpConnection.html" title="A TCP SocketConnection. ">TcpConnection</a> does if you call g_tcp_connection_set_graceful_disconnect(). But of course, this only works if the client will close its connection after the server does.)</p>
735
 
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000102">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
 
750
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000098">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
736
751
<dl class="section return"><dt>Returns</dt><dd><code>true</code> on success, <code>false</code> on error. </dd></dl>
737
752
 
738
753
</div>
756
771
<p>Note that on Windows, it is possible for an operation to return IO_ERROR_WOULD_BLOCK even immediately after g_socket_condition_check() has claimed that the socket is ready for writing. Rather than calling g_socket_condition_check() and then writing to the socket if it succeeds, it is generally better to simply try writing to the socket right away, and try again later if the initial attempt returns IO_ERROR_WOULD_BLOCK.</p>
757
772
<p>It is meaningless to specify IO_ERR or IO_HUP in condition; these conditions will always be set in the output if they are true.</p>
758
773
<p>This call never blocks.</p>
759
 
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000106">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
 
774
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000102">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
760
775
<dl class="params"><dt>Parameters</dt><dd>
761
776
  <table class="params">
762
777
    <tr><td class="paramname">condition</td><td>A IOCondition mask to check. </td></tr>
871
886
<p>When the condition is met, <code>true</code> is returned.</p>
872
887
<p>If <em>cancellable</em> is cancelled before the condition is met, or if the socket has a timeout set and it is reached before the condition is met, then <code>false</code> is returned and <em>error</em>, if non-<code>0</code>, is set to the appropriate value (IO_ERROR_CANCELLED or IO_ERROR_TIMED_OUT).</p>
873
888
<p>See also g_socket_condition_timed_wait().</p>
874
 
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000107">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
 
889
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000103">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
875
890
<dl class="params"><dt>Parameters</dt><dd>
876
891
  <table class="params">
877
892
    <tr><td class="paramname">condition</td><td>A IOCondition mask to wait for. </td></tr>
926
941
</div><div class="memdoc">
927
942
 
928
943
<p>Connect the socket to the specified remote address. </p>
929
 
<p>For connection oriented socket this generally means we attempt to make a connection to the <em>address</em>. For a connection-less socket it sets the default address for g_socket_send() and discards all incoming datagrams from other sources.</p>
 
944
<p>For connection oriented socket this generally means we attempt to make a connection to the address . For a connection-less socket it sets the default address for <a class="el" href="classGio_1_1Socket.html#adc5c3145109841e0406150ad0b7f547c" title="Tries to send size bytes from buffer on the socket. ">Socket::send()</a> and discards all incoming datagrams from other sources.</p>
930
945
<p>Generally connection oriented sockets can only connect once, but connection-less sockets can connect multiple times to change the default address.</p>
931
 
<p>If the connect call needs to do network I/O it will block, unless non-blocking I/O is enabled. Then IO_ERROR_PENDING is returned and the user can be notified of the connection finishing by waiting for the G_IO_OUT condition. The result of the connection must then be checked with g_socket_check_connect_result().</p>
932
 
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000097">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
 
946
<p>If the connect call needs to do network I/O it will block, unless non-blocking I/O is enabled. Then <a class="el" href="classGio_1_1Error.html" title="Exception class for giomm errors. ">Gio::Error</a> with ERROR_PENDING is thrown and the user can be notified of the connection finishing by waiting for the <a class="el" href="namespaceGlib.html#gabd96381793b70d4ae32c725926990918a0945b81e85eb8d2d26e77fdc04821cae" title="Data can be written (without blocking). ">Glib::IO_OUT</a> condition. The result of the connection must then be checked with <a class="el" href="classGio_1_1Socket.html#a06b68dc0948e6dfa158487c314f9a521" title="Checks and resets the pending connect error for the socket. ">Socket::check_connect_result()</a>.</p>
933
947
<dl class="params"><dt>Parameters</dt><dd>
934
948
  <table class="params">
935
 
    <tr><td class="paramname">address</td><td>A <a class="el" href="classGio_1_1SocketAddress.html" title="Abstract base class representing endpoints for socket communication. ">SocketAddress</a> specifying the remote address. </td></tr>
936
 
    <tr><td class="paramname">cancellable</td><td>A <a class="el" href="classGio_1_1Cancellable.html" title="Allows actions to be cancelled. ">Cancellable</a> or <code>0</code>. </td></tr>
937
 
  </table>
938
 
  </dd>
939
 
</dl>
940
 
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if connected, <code>false</code> on error. </dd></dl>
 
949
    <tr><td class="paramname">address</td><td>a <a class="el" href="classGio_1_1SocketAddress.html" title="Abstract base class representing endpoints for socket communication. ">SocketAddress</a> specifying the remote address. </td></tr>
 
950
    <tr><td class="paramname">cancellable</td><td>A <a class="el" href="classGio_1_1Cancellable.html" title="Allows actions to be cancelled. ">Cancellable</a> object which can be used to cancel the operation.</td></tr>
 
951
  </table>
 
952
  </dd>
 
953
</dl>
 
954
<dl class="exception"><dt>Exceptions</dt><dd>
 
955
  <table class="exception">
 
956
    <tr><td class="paramname"><a class="el" href="classGio_1_1Error.html" title="Exception class for giomm errors. ">Gio::Error</a></td><td></td></tr>
 
957
  </table>
 
958
  </dd>
 
959
</dl>
941
960
 
942
961
</div>
943
962
</div>
1019
1038
<dl class="section return"><dt>Returns</dt><dd>A <a class="el" href="classGio_1_1Socket.html" title="Low-level socket object. ">Socket</a> or <code>0</code> on error. Free the returned object with Glib::object_unref().</dd></dl>
1020
1039
<dl class="params"><dt>Parameters</dt><dd>
1021
1040
  <table class="params">
1022
 
    <tr><td class="paramname">cancellable</td><td>A <a class="el" href="classGio_1_1Cancellable.html" title="Allows actions to be cancelled. ">Cancellable</a>, or <code>0</code>. </td></tr>
 
1041
    <tr><td class="paramname">cancellable</td><td>A <a class="el" href="classGio_1_1Cancellable.html" title="Allows actions to be cancelled. ">Cancellable</a> object which can be used to cancel the operation. </td></tr>
1023
1042
  </table>
1024
1043
  </dd>
1025
1044
</dl>
1076
1095
<dl class="section return"><dt>Returns</dt><dd>A <a class="el" href="classGio_1_1Socket.html" title="Low-level socket object. ">Socket</a> or <code>0</code> on error. Free the returned object with Glib::object_unref().</dd></dl>
1077
1096
<dl class="params"><dt>Parameters</dt><dd>
1078
1097
  <table class="params">
1079
 
    <tr><td class="paramname">cancellable</td><td>A <a class="el" href="classGio_1_1Cancellable.html" title="Allows actions to be cancelled. ">Cancellable</a>, or <code>0</code>. </td></tr>
 
1098
    <tr><td class="paramname">cancellable</td><td>A <a class="el" href="classGio_1_1Cancellable.html" title="Allows actions to be cancelled. ">Cancellable</a> object which can be used to cancel the operation. </td></tr>
1080
1099
  </table>
1081
1100
  </dd>
1082
1101
</dl>
1125
1144
 
1126
1145
<p>Gets the blocking mode of the socket. </p>
1127
1146
<p>For details on blocking I/O, see g_socket_set_blocking().</p>
1128
 
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000111">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
 
1147
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000107">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
1129
1148
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if blocking I/O is used, <code>false</code> otherwise. </dd></dl>
1130
1149
 
1131
1150
</div>
1205
1224
</div><div class="memdoc">
1206
1225
 
1207
1226
<p>Gets the socket family of the socket. </p>
1208
 
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000114">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
 
1227
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000110">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
1209
1228
<dl class="section return"><dt>Returns</dt><dd>A SocketFamily. </dd></dl>
1210
1229
 
1211
1230
</div>
1225
1244
 
1226
1245
<p>Returns the underlying OS socket object. </p>
1227
1246
<p>On unix this is a socket file descriptor, and on Windows this is a Winsock2 SOCKET handle. This may be useful for doing platform specific or otherwise unusual operations on the socket.</p>
1228
 
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000115">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
 
1247
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000111">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
1229
1248
<dl class="section return"><dt>Returns</dt><dd>The file descriptor of the socket. </dd></dl>
1230
1249
 
1231
1250
</div>
1245
1264
 
1246
1265
<p>Gets the keepalive mode of the socket. </p>
1247
1266
<p>For details on this, see g_socket_set_keepalive().</p>
1248
 
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000113">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
 
1267
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000109">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
1249
1268
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if keepalive is active, <code>false</code> otherwise. </dd></dl>
1250
1269
 
1251
1270
</div>
1265
1284
 
1266
1285
<p>Gets the listen backlog setting of the socket. </p>
1267
1286
<p>For details on this, see g_socket_set_listen_backlog().</p>
1268
 
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000109">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
 
1287
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000105">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
1269
1288
<dl class="section return"><dt>Returns</dt><dd>The maximum number of pending connections. </dd></dl>
1270
1289
 
1271
1290
</div>
1285
1304
 
1286
1305
<p>Try to get the local address of a bound socket. </p>
1287
1306
<p>This is only useful if the socket has been bound to a local address, either explicitly or implicitly when connecting.</p>
1288
 
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000116">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
 
1307
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000112">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
1289
1308
<dl class="section return"><dt>Returns</dt><dd>A <a class="el" href="classGio_1_1SocketAddress.html" title="Abstract base class representing endpoints for socket communication. ">SocketAddress</a> or <code>0</code> on error. Free the returned object with Glib::object_unref(). </dd></dl>
1290
1309
 
1291
1310
</div>
1328
1347
 
1329
1348
</div>
1330
1349
</div>
 
1350
<a class="anchor" id="ae797a60397ec1035d07e625cc3bc423c"></a>
 
1351
<div class="memitem">
 
1352
<div class="memproto">
 
1353
      <table class="memname">
 
1354
        <tr>
 
1355
          <td class="memname">bool Gio::Socket::get_option </td>
 
1356
          <td>(</td>
 
1357
          <td class="paramtype">int&#160;</td>
 
1358
          <td class="paramname"><em>level</em>, </td>
 
1359
        </tr>
 
1360
        <tr>
 
1361
          <td class="paramkey"></td>
 
1362
          <td></td>
 
1363
          <td class="paramtype">int&#160;</td>
 
1364
          <td class="paramname"><em>optname</em>, </td>
 
1365
        </tr>
 
1366
        <tr>
 
1367
          <td class="paramkey"></td>
 
1368
          <td></td>
 
1369
          <td class="paramtype">int &amp;&#160;</td>
 
1370
          <td class="paramname"><em>value</em>&#160;</td>
 
1371
        </tr>
 
1372
        <tr>
 
1373
          <td></td>
 
1374
          <td>)</td>
 
1375
          <td></td><td> const</td>
 
1376
        </tr>
 
1377
      </table>
 
1378
</div><div class="memdoc">
 
1379
 
 
1380
<p>Gets the value of an integer-valued option on <em>socket</em>, as with getsockopt(). </p>
 
1381
<p>(If you need to fetch a non-integer-valued option, you will need to call getsockopt() directly.)</p>
 
1382
<p>The [&lt;gio/gnetworking.h&gt;][gio-gnetworking.h] header pulls in system headers that will define most of the standard/portable socket options. For unusual socket protocols or platform-dependent options, you may need to include additional headers.</p>
 
1383
<p>Note that even for socket options that are a single byte in size, <em>value</em> is still a pointer to a <code>int</code> variable, not a #guchar; g_socket_get_option() will handle the conversion internally.</p>
 
1384
<dl class="since_2_36"><dt><b><a class="el" href="since_2_36.html#_since_2_36000022">Since glibmm 2.36:</a></b></dt><dd></dd></dl>
 
1385
<dl class="params"><dt>Parameters</dt><dd>
 
1386
  <table class="params">
 
1387
    <tr><td class="paramname">level</td><td>The "API level" of the option (eg, <code>SOL_SOCKET</code>). </td></tr>
 
1388
    <tr><td class="paramname">optname</td><td>The "name" of the option (eg, <code>SO_BROADCAST</code>). </td></tr>
 
1389
    <tr><td class="paramname">value</td><td>Return location for the option value. </td></tr>
 
1390
  </table>
 
1391
  </dd>
 
1392
</dl>
 
1393
<dl class="section return"><dt>Returns</dt><dd>Success or failure. On failure, <em>error</em> will be set, and the system error value (<code>errno</code> or WSAGetLastError()) will still be set to the result of the getsockopt() call. </dd></dl>
 
1394
 
 
1395
</div>
 
1396
</div>
1331
1397
<a class="anchor" id="a4ecd966ee71eb956258b289cf63eb43e"></a>
1332
1398
<div class="memitem">
1333
1399
<div class="memproto">
1343
1409
 
1344
1410
<p>Gets the socket protocol id the socket was created with. </p>
1345
1411
<p>In case the protocol is unknown, -1 is returned.</p>
1346
 
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000118">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
 
1412
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000114">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
1347
1413
<dl class="section return"><dt>Returns</dt><dd>A protocol id, or -1 if unknown. </dd></dl>
1348
1414
 
1349
1415
</div>
1363
1429
 
1364
1430
<p>Try to get the remove address of a connected socket. </p>
1365
1431
<p>This is only useful for connection oriented sockets that have been connected.</p>
1366
 
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000117">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
 
1432
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000113">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
1367
1433
<dl class="section return"><dt>Returns</dt><dd>A <a class="el" href="classGio_1_1SocketAddress.html" title="Abstract base class representing endpoints for socket communication. ">SocketAddress</a> or <code>0</code> on error. Free the returned object with Glib::object_unref(). </dd></dl>
1368
1434
 
1369
1435
</div>
1382
1448
</div><div class="memdoc">
1383
1449
 
1384
1450
<p>Gets the socket type of the socket. </p>
1385
 
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000119">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
 
1451
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000115">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
1386
1452
<dl class="section return"><dt>Returns</dt><dd>A SocketType. </dd></dl>
1387
1453
 
1388
1454
</div>
1532
1598
</div><div class="memdoc">
1533
1599
 
1534
1600
<p>Checks whether a socket is closed. </p>
1535
 
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000103">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
 
1601
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000099">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
1536
1602
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if socket is closed, <code>false</code> otherwise. </dd></dl>
1537
1603
 
1538
1604
</div>
1552
1618
 
1553
1619
<p>Check whether the socket is connected. </p>
1554
1620
<p>This is only useful for connection-oriented sockets.</p>
1555
 
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000105">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
 
1621
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000101">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
1556
1622
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if socket is connected, <code>false</code> otherwise. </dd></dl>
1557
1623
 
1558
1624
</div>
1718
1784
      </table>
1719
1785
</div><div class="memdoc">
1720
1786
 
1721
 
<p>Marks the socket as a server socket, i.e. a socket that is used to accept incoming requests using g_socket_accept(). </p>
1722
 
<p>Before calling this the socket must be bound to a local address using g_socket_bind().</p>
1723
 
<p>To set the maximum amount of outstanding clients, use g_socket_set_listen_backlog().</p>
1724
 
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000095">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
1725
 
<dl class="section return"><dt>Returns</dt><dd><code>true</code> on success, <code>false</code> on error. </dd></dl>
 
1787
<p>Marks the socket as a server socket - a socket that is used to accept incoming requests using <a class="el" href="classGio_1_1Socket.html#a4b6c036db4e484e6b7f0419962254888" title="A accept() convenience overload. ">Socket::accept()</a>. </p>
 
1788
<p>Before calling this the socket must be bound to a local address using <a class="el" href="classGio_1_1Socket.html#a16044bba5924c183cff90f0a4cf47394" title="When a socket is created it is attached to an address family, but it doesn&#39;t have an address in this ...">Socket::bind()</a>.</p>
 
1789
<p>To set the maximum amount of outstanding clients, use <a class="el" href="classGio_1_1Socket.html#adc7b9d6cecc1c2234f9979b2ffb1b309" title="Sets the maximum number of outstanding connections allowed when listening on this socket...">Socket::set_listen_backlog()</a>.</p>
 
1790
<dl class="exception"><dt>Exceptions</dt><dd>
 
1791
  <table class="exception">
 
1792
    <tr><td class="paramname"><a class="el" href="classGio_1_1Error.html" title="Exception class for giomm errors. ">Gio::Error</a></td><td></td></tr>
 
1793
  </table>
 
1794
  </dd>
 
1795
</dl>
1726
1796
 
1727
1797
</div>
1728
1798
</div>
2180
2250
<p>For SOCKET_TYPE_STREAM sockets, g_socket_receive() can return any number of bytes, up to <em>size</em>. If more than <em>size</em> bytes have been received, the additional data will be returned in future calls to g_socket_receive().</p>
2181
2251
<p>If the socket is in blocking mode the call will block until there is some data to receive, the connection is closed, or there is an error. If there is no data available and the socket is in non-blocking mode, a IO_ERROR_WOULD_BLOCK error will be returned. To be notified when data is available, wait for the IO_IN condition.</p>
2182
2252
<p>On error -1 is returned and <em>error</em> is set accordingly.</p>
2183
 
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000099">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
 
2253
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000095">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
2184
2254
<dl class="params"><dt>Parameters</dt><dd>
2185
2255
  <table class="params">
2186
2256
    <tr><td class="paramname">buffer</td><td>A buffer to read data into (which should be at least <em>size</em> bytes long). </td></tr>
2376
2446
<p>This is mainly used by connection-oriented sockets; it is identical to g_socket_send_to() with <em>address</em> set to <code>0</code>.</p>
2377
2447
<p>If the socket is in blocking mode the call will block until there is space for the data in the socket queue. If there is no space available and the socket is in non-blocking mode a IO_ERROR_WOULD_BLOCK error will be returned. To be notified when space is available, wait for the IO_OUT condition. Note though that you may still receive IO_ERROR_WOULD_BLOCK from g_socket_send() even if you were previously notified of a IO_OUT condition. (On Windows in particular, this is very common due to the way the underlying APIs work.)</p>
2378
2448
<p>On error -1 is returned and <em>error</em> is set accordingly.</p>
2379
 
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000100">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
 
2449
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000096">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
2380
2450
<dl class="params"><dt>Parameters</dt><dd>
2381
2451
  <table class="params">
2382
2452
    <tr><td class="paramname">buffer</td><td>The buffer containing the data to send. </td></tr>
2456
2526
<p>Tries to send <em>size</em> bytes from <em>buffer</em> to <em>address</em>. </p>
2457
2527
<p>If <em>address</em> is <code>0</code> then the message is sent to the default receiver (set by g_socket_connect()).</p>
2458
2528
<p>See g_socket_send() for additional information.</p>
2459
 
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000101">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
 
2529
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000097">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
2460
2530
<dl class="params"><dt>Parameters</dt><dd>
2461
2531
  <table class="params">
2462
2532
    <tr><td class="paramname">address</td><td>A <a class="el" href="classGio_1_1SocketAddress.html" title="Abstract base class representing endpoints for socket communication. ">SocketAddress</a>, or <code>0</code>. </td></tr>
2572
2642
<p>Sets the blocking mode of the socket. </p>
2573
2643
<p>In blocking mode all operations block until they succeed or there is an error. In non-blocking mode all functions return results immediately or with a IO_ERROR_WOULD_BLOCK error.</p>
2574
2644
<p>All sockets are created in blocking mode. However, note that the platform level socket is always non-blocking, and blocking mode is a GSocket level feature.</p>
2575
 
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000110">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
 
2645
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000106">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
2576
2646
<dl class="params"><dt>Parameters</dt><dd>
2577
2647
  <table class="params">
2578
2648
    <tr><td class="paramname">blocking</td><td>Whether to use blocking I/O or not. </td></tr>
2626
2696
<p>When this flag is set on a socket, the system will attempt to verify that the remote socket endpoint is still present if a sufficiently long period of time passes with no data being exchanged. If the system is unable to verify the presence of the remote endpoint, it will automatically close the connection.</p>
2627
2697
<p>This option is only functional on certain kinds of sockets. (Notably, SOCKET_PROTOCOL_TCP sockets.)</p>
2628
2698
<p>The exact time between pings is system- and protocol-dependent, but will normally be at least two hours. Most commonly, you would set this flag on a server socket if you want to allow clients to remain idle for long periods of time, but also want to ensure that connections are eventually garbage-collected if clients crash or become unreachable.</p>
2629
 
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000112">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
 
2699
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000108">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
2630
2700
<dl class="params"><dt>Parameters</dt><dd>
2631
2701
  <table class="params">
2632
2702
    <tr><td class="paramname">keepalive</td><td>Value for the keepalive flag. </td></tr>
2653
2723
<p>Sets the maximum number of outstanding connections allowed when listening on this socket. </p>
2654
2724
<p>If more clients than this are connecting to the socket and the application is not handling them on time then the new connections will be refused.</p>
2655
2725
<p>Note that this must be called before g_socket_listen() and has no effect if called after that.</p>
2656
 
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000108">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
 
2726
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000104">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
2657
2727
<dl class="params"><dt>Parameters</dt><dd>
2658
2728
  <table class="params">
2659
2729
    <tr><td class="paramname">backlog</td><td>The maximum number of pending connections. </td></tr>
2715
2785
 
2716
2786
</div>
2717
2787
</div>
 
2788
<a class="anchor" id="a13116c8ad9db97e3c04a370a8a7ec7d3"></a>
 
2789
<div class="memitem">
 
2790
<div class="memproto">
 
2791
      <table class="memname">
 
2792
        <tr>
 
2793
          <td class="memname">bool Gio::Socket::set_option </td>
 
2794
          <td>(</td>
 
2795
          <td class="paramtype">int&#160;</td>
 
2796
          <td class="paramname"><em>level</em>, </td>
 
2797
        </tr>
 
2798
        <tr>
 
2799
          <td class="paramkey"></td>
 
2800
          <td></td>
 
2801
          <td class="paramtype">int&#160;</td>
 
2802
          <td class="paramname"><em>optname</em>, </td>
 
2803
        </tr>
 
2804
        <tr>
 
2805
          <td class="paramkey"></td>
 
2806
          <td></td>
 
2807
          <td class="paramtype">int&#160;</td>
 
2808
          <td class="paramname"><em>value</em>&#160;</td>
 
2809
        </tr>
 
2810
        <tr>
 
2811
          <td></td>
 
2812
          <td>)</td>
 
2813
          <td></td><td></td>
 
2814
        </tr>
 
2815
      </table>
 
2816
</div><div class="memdoc">
 
2817
 
 
2818
<p>Sets the value of an integer-valued option on <em>socket</em>, as with setsockopt(). </p>
 
2819
<p>(If you need to set a non-integer-valued option, you will need to call setsockopt() directly.)</p>
 
2820
<p>The [&lt;gio/gnetworking.h&gt;][gio-gnetworking.h] header pulls in system headers that will define most of the standard/portable socket options. For unusual socket protocols or platform-dependent options, you may need to include additional headers.</p>
 
2821
<dl class="since_2_36"><dt><b><a class="el" href="since_2_36.html#_since_2_36000023">Since glibmm 2.36:</a></b></dt><dd></dd></dl>
 
2822
<dl class="params"><dt>Parameters</dt><dd>
 
2823
  <table class="params">
 
2824
    <tr><td class="paramname">level</td><td>The "API level" of the option (eg, <code>SOL_SOCKET</code>). </td></tr>
 
2825
    <tr><td class="paramname">optname</td><td>The "name" of the option (eg, <code>SO_BROADCAST</code>). </td></tr>
 
2826
    <tr><td class="paramname">value</td><td>The value to set the option to. </td></tr>
 
2827
  </table>
 
2828
  </dd>
 
2829
</dl>
 
2830
<dl class="section return"><dt>Returns</dt><dd>Success or failure. On failure, <em>error</em> will be set, and the system error value (<code>errno</code> or WSAGetLastError()) will still be set to the result of the setsockopt() call. </dd></dl>
 
2831
 
 
2832
</div>
 
2833
</div>
2718
2834
<a class="anchor" id="afe942e5157528b217d7af4a7839a9e7a"></a>
2719
2835
<div class="memitem">
2720
2836
<div class="memproto">
2799
2915
<p>If <em>shutdown_write</em> is <code>true</code> then the sending side of the connection is shut down, and further writing is disallowed.</p>
2800
2916
<p>It is allowed for both <em>shutdown_read</em> and <em>shutdown_write</em> to be <code>true</code>.</p>
2801
2917
<p>One example where this is used is graceful disconnect for TCP connections where you close the sending side, then wait for the other side to close the connection, thus ensuring that the other side saw all sent data.</p>
2802
 
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000104">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
 
2918
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000100">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
2803
2919
<dl class="params"><dt>Parameters</dt><dd>
2804
2920
  <table class="params">
2805
2921
    <tr><td class="paramname">shutdown_read</td><td>Whether to shut down the read side. </td></tr>
2827
2943
<p>Checks if a socket is capable of speaking IPv4. </p>
2828
2944
<p>IPv4 sockets are capable of speaking IPv4. On some operating systems and under some combinations of circumstances IPv6 sockets are also capable of speaking IPv4. See RFC 3493 section 3.7 for more information.</p>
2829
2945
<p>No other types of sockets are currently considered as being capable of speaking IPv4.</p>
2830
 
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000120">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
 
2946
<dl class="since_2_22"><dt><b><a class="el" href="since_2_22.html#_since_2_22000116">Since glibmm 2.22:</a></b></dt><dd></dd></dl>
2831
2947
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if this socket can be used with IPv4. </dd></dl>
2832
2948
 
2833
2949
</div>
2880
2996
</div><!-- contents -->
2881
2997
<!-- start footer part -->
2882
2998
<hr class="footer"/><address class="footer"><small>
2883
 
Generated on Mon Feb 17 2014 09:42:52 for glibmm by &#160;<a href="http://www.doxygen.org/index.html">
 
2999
Generated on Sat Apr 5 2014 14:43:03 for glibmm by &#160;<a href="http://www.doxygen.org/index.html">
2884
3000
<img class="footer" src="doxygen.png" alt="doxygen"/>
2885
3001
</a> 1.8.4
2886
3002
</small></address>