summaryrefslogtreecommitdiff
path: root/h1z1/libghack/CSFML-2.1-windows-32bits/CSFML-2.1/doc/html/TcpSocket_8h.htm
diff options
context:
space:
mode:
Diffstat (limited to 'h1z1/libghack/CSFML-2.1-windows-32bits/CSFML-2.1/doc/html/TcpSocket_8h.htm')
-rwxr-xr-xh1z1/libghack/CSFML-2.1-windows-32bits/CSFML-2.1/doc/html/TcpSocket_8h.htm530
1 files changed, 530 insertions, 0 deletions
diff --git a/h1z1/libghack/CSFML-2.1-windows-32bits/CSFML-2.1/doc/html/TcpSocket_8h.htm b/h1z1/libghack/CSFML-2.1-windows-32bits/CSFML-2.1/doc/html/TcpSocket_8h.htm
new file mode 100755
index 0000000..d2e6d45
--- /dev/null
+++ b/h1z1/libghack/CSFML-2.1-windows-32bits/CSFML-2.1/doc/html/TcpSocket_8h.htm
@@ -0,0 +1,530 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSFML - C binding of the Simple and Fast Multimedia Library</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+ <!--<link rel='stylesheet' type='text/css' href="http://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic"/>-->
+ <link rel="stylesheet" type="text/css" href="doxygen.css" title="default" media="screen,print" />
+ </head>
+ <body>
+ <div id="banner-container">
+ <div id="banner">
+ <span id="sfml">CSFML</span>
+ </div>
+ </div>
+ <div id="content">
+<!-- Generated by Doxygen 1.8.2 -->
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.htm"><span>Main&#160;Page</span></a></li>
+ <li><a href="annotated.htm"><span>Data&#160;Structures</span></a></li>
+ <li class="current"><a href="files.htm"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow2" class="tabs2">
+ <ul class="tablist">
+ <li><a href="files.htm"><span>File&#160;List</span></a></li>
+ <li><a href="globals.htm"><span>Globals</span></a></li>
+ </ul>
+ </div>
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="dir_6a66b7969672f1da69f458a57d2c97f9.htm">include</a></li><li class="navelem"><a class="el" href="dir_8cc999c03ab8fdf40558b1f21f869c3e.htm">SFML</a></li><li class="navelem"><a class="el" href="dir_33b8fa607ba222d3f5ced3f03c94935c.htm">Network</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="summary">
+<a href="#func-members">Functions</a> </div>
+ <div class="headertitle">
+<div class="title">TcpSocket.h File Reference</div> </div>
+</div><!--header-->
+<div class="contents">
+<div class="textblock"><code>#include &lt;<a class="el" href="Network_2Export_8h_source.htm">SFML/Network/Export.h</a>&gt;</code><br/>
+<code>#include &lt;<a class="el" href="IpAddress_8h_source.htm">SFML/Network/IpAddress.h</a>&gt;</code><br/>
+<code>#include &lt;<a class="el" href="SocketStatus_8h_source.htm">SFML/Network/SocketStatus.h</a>&gt;</code><br/>
+<code>#include &lt;<a class="el" href="Network_2Types_8h_source.htm">SFML/Network/Types.h</a>&gt;</code><br/>
+<code>#include &lt;<a class="el" href="Time_8h_source.htm">SFML/System/Time.h</a>&gt;</code><br/>
+<code>#include &lt;stddef.h&gt;</code><br/>
+</div>
+<p><a href="TcpSocket_8h_source.htm">Go to the source code of this file.</a></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:a2e7a7f721c7131bc7a01d300c61fb96a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Network_2Export_8h.htm#a957428faa4fd4d577529c669fedd3014">CSFML_NETWORK_API</a> <a class="el" href="Network_2Types_8h.htm#a30618a949f242924c3a6d1185c1b033f">sfTcpSocket</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="TcpSocket_8h.htm#a2e7a7f721c7131bc7a01d300c61fb96a">sfTcpSocket_create</a> (void)</td></tr>
+<tr class="memdesc:a2e7a7f721c7131bc7a01d300c61fb96a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new TCP socket. <a href="#a2e7a7f721c7131bc7a01d300c61fb96a"></a><br/></td></tr>
+<tr class="separator:a2e7a7f721c7131bc7a01d300c61fb96a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a5ccedadb6ebc020c3cbb37dbd049778b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Network_2Export_8h.htm#a957428faa4fd4d577529c669fedd3014">CSFML_NETWORK_API</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="TcpSocket_8h.htm#a5ccedadb6ebc020c3cbb37dbd049778b">sfTcpSocket_destroy</a> (<a class="el" href="Network_2Types_8h.htm#a30618a949f242924c3a6d1185c1b033f">sfTcpSocket</a> *socket)</td></tr>
+<tr class="memdesc:a5ccedadb6ebc020c3cbb37dbd049778b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy a TCP socket. <a href="#a5ccedadb6ebc020c3cbb37dbd049778b"></a><br/></td></tr>
+<tr class="separator:a5ccedadb6ebc020c3cbb37dbd049778b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a4b45f9e40dcf7879f165e8279de44237"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Network_2Export_8h.htm#a957428faa4fd4d577529c669fedd3014">CSFML_NETWORK_API</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="TcpSocket_8h.htm#a4b45f9e40dcf7879f165e8279de44237">sfTcpSocket_setBlocking</a> (<a class="el" href="Network_2Types_8h.htm#a30618a949f242924c3a6d1185c1b033f">sfTcpSocket</a> *socket, <a class="el" href="Config_8h.htm#a7559f07a31bb3a4a3d865178ce4dc70b">sfBool</a> blocking)</td></tr>
+<tr class="memdesc:a4b45f9e40dcf7879f165e8279de44237"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the blocking state of a TCP listener. <a href="#a4b45f9e40dcf7879f165e8279de44237"></a><br/></td></tr>
+<tr class="separator:a4b45f9e40dcf7879f165e8279de44237"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a75bb56edaaf054a581494c64b7eed4a8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Network_2Export_8h.htm#a957428faa4fd4d577529c669fedd3014">CSFML_NETWORK_API</a> <a class="el" href="Config_8h.htm#a7559f07a31bb3a4a3d865178ce4dc70b">sfBool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="TcpSocket_8h.htm#a75bb56edaaf054a581494c64b7eed4a8">sfTcpSocket_isBlocking</a> (const <a class="el" href="Network_2Types_8h.htm#a30618a949f242924c3a6d1185c1b033f">sfTcpSocket</a> *socket)</td></tr>
+<tr class="memdesc:a75bb56edaaf054a581494c64b7eed4a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tell whether a TCP socket is in blocking or non-blocking mode. <a href="#a75bb56edaaf054a581494c64b7eed4a8"></a><br/></td></tr>
+<tr class="separator:a75bb56edaaf054a581494c64b7eed4a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a1ebf96d27670ca943a4b177ff332d23c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Network_2Export_8h.htm#a957428faa4fd4d577529c669fedd3014">CSFML_NETWORK_API</a> unsigned short&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="TcpSocket_8h.htm#a1ebf96d27670ca943a4b177ff332d23c">sfTcpSocket_getLocalPort</a> (const <a class="el" href="Network_2Types_8h.htm#a30618a949f242924c3a6d1185c1b033f">sfTcpSocket</a> *socket)</td></tr>
+<tr class="memdesc:a1ebf96d27670ca943a4b177ff332d23c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the port to which a TCP socket is bound locally. <a href="#a1ebf96d27670ca943a4b177ff332d23c"></a><br/></td></tr>
+<tr class="separator:a1ebf96d27670ca943a4b177ff332d23c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:afb359983c56c78d5891a32740364ba52"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Network_2Export_8h.htm#a957428faa4fd4d577529c669fedd3014">CSFML_NETWORK_API</a> <a class="el" href="structsfIpAddress.htm">sfIpAddress</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="TcpSocket_8h.htm#afb359983c56c78d5891a32740364ba52">sfTcpSocket_getRemoteAddress</a> (const <a class="el" href="Network_2Types_8h.htm#a30618a949f242924c3a6d1185c1b033f">sfTcpSocket</a> *socket)</td></tr>
+<tr class="memdesc:afb359983c56c78d5891a32740364ba52"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the address of the connected peer of a TCP socket. <a href="#afb359983c56c78d5891a32740364ba52"></a><br/></td></tr>
+<tr class="separator:afb359983c56c78d5891a32740364ba52"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a853404b1381b6385a1217a6e75afc91b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Network_2Export_8h.htm#a957428faa4fd4d577529c669fedd3014">CSFML_NETWORK_API</a> unsigned short&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="TcpSocket_8h.htm#a853404b1381b6385a1217a6e75afc91b">sfTcpSocket_getRemotePort</a> (const <a class="el" href="Network_2Types_8h.htm#a30618a949f242924c3a6d1185c1b033f">sfTcpSocket</a> *socket)</td></tr>
+<tr class="memdesc:a853404b1381b6385a1217a6e75afc91b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the port of the connected peer to which a TCP socket is connected. <a href="#a853404b1381b6385a1217a6e75afc91b"></a><br/></td></tr>
+<tr class="separator:a853404b1381b6385a1217a6e75afc91b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a9c4184f1812234019fd72f6e59e97e80"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Network_2Export_8h.htm#a957428faa4fd4d577529c669fedd3014">CSFML_NETWORK_API</a> <a class="el" href="SocketStatus_8h.htm#a7ea6036375503daef59eb4cb38ccdcaa">sfSocketStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="TcpSocket_8h.htm#a9c4184f1812234019fd72f6e59e97e80">sfTcpSocket_connect</a> (<a class="el" href="Network_2Types_8h.htm#a30618a949f242924c3a6d1185c1b033f">sfTcpSocket</a> *socket, <a class="el" href="structsfIpAddress.htm">sfIpAddress</a> host, unsigned short port, <a class="el" href="structsfTime.htm">sfTime</a> timeout)</td></tr>
+<tr class="memdesc:a9c4184f1812234019fd72f6e59e97e80"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connect a TCP socket to a remote peer. <a href="#a9c4184f1812234019fd72f6e59e97e80"></a><br/></td></tr>
+<tr class="separator:a9c4184f1812234019fd72f6e59e97e80"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aac5cc7a607cf3a0eb26298cca3a9975f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Network_2Export_8h.htm#a957428faa4fd4d577529c669fedd3014">CSFML_NETWORK_API</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="TcpSocket_8h.htm#aac5cc7a607cf3a0eb26298cca3a9975f">sfTcpSocket_disconnect</a> (<a class="el" href="Network_2Types_8h.htm#a30618a949f242924c3a6d1185c1b033f">sfTcpSocket</a> *socket)</td></tr>
+<tr class="memdesc:aac5cc7a607cf3a0eb26298cca3a9975f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disconnect a TCP socket from its remote peer. <a href="#aac5cc7a607cf3a0eb26298cca3a9975f"></a><br/></td></tr>
+<tr class="separator:aac5cc7a607cf3a0eb26298cca3a9975f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aeffdc58f74c32006760ca3f0b960911b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Network_2Export_8h.htm#a957428faa4fd4d577529c669fedd3014">CSFML_NETWORK_API</a> <a class="el" href="SocketStatus_8h.htm#a7ea6036375503daef59eb4cb38ccdcaa">sfSocketStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="TcpSocket_8h.htm#aeffdc58f74c32006760ca3f0b960911b">sfTcpSocket_send</a> (<a class="el" href="Network_2Types_8h.htm#a30618a949f242924c3a6d1185c1b033f">sfTcpSocket</a> *socket, const void *data, size_t size)</td></tr>
+<tr class="memdesc:aeffdc58f74c32006760ca3f0b960911b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send raw data to the remote peer of a TCP socket. <a href="#aeffdc58f74c32006760ca3f0b960911b"></a><br/></td></tr>
+<tr class="separator:aeffdc58f74c32006760ca3f0b960911b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aee28daf5169c0a5267f577335bc1d7ae"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Network_2Export_8h.htm#a957428faa4fd4d577529c669fedd3014">CSFML_NETWORK_API</a> <a class="el" href="SocketStatus_8h.htm#a7ea6036375503daef59eb4cb38ccdcaa">sfSocketStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="TcpSocket_8h.htm#aee28daf5169c0a5267f577335bc1d7ae">sfTcpSocket_receive</a> (<a class="el" href="Network_2Types_8h.htm#a30618a949f242924c3a6d1185c1b033f">sfTcpSocket</a> *socket, void *data, size_t maxSize, size_t *sizeReceived)</td></tr>
+<tr class="memdesc:aee28daf5169c0a5267f577335bc1d7ae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Receive raw data from the remote peer of a TCP socket. <a href="#aee28daf5169c0a5267f577335bc1d7ae"></a><br/></td></tr>
+<tr class="separator:aee28daf5169c0a5267f577335bc1d7ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aa1bcf582e4d66d89abf05ba20688e3ef"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Network_2Export_8h.htm#a957428faa4fd4d577529c669fedd3014">CSFML_NETWORK_API</a> <a class="el" href="SocketStatus_8h.htm#a7ea6036375503daef59eb4cb38ccdcaa">sfSocketStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="TcpSocket_8h.htm#aa1bcf582e4d66d89abf05ba20688e3ef">sfTcpSocket_sendPacket</a> (<a class="el" href="Network_2Types_8h.htm#a30618a949f242924c3a6d1185c1b033f">sfTcpSocket</a> *socket, <a class="el" href="Network_2Types_8h.htm#a2a26ce53a9a6b6ab78807fd31aa32815">sfPacket</a> *packet)</td></tr>
+<tr class="memdesc:aa1bcf582e4d66d89abf05ba20688e3ef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send a formatted packet of data to the remote peer of a TCP socket. <a href="#aa1bcf582e4d66d89abf05ba20688e3ef"></a><br/></td></tr>
+<tr class="separator:aa1bcf582e4d66d89abf05ba20688e3ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aec570f5bb1a24918c85d05b305bb7523"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Network_2Export_8h.htm#a957428faa4fd4d577529c669fedd3014">CSFML_NETWORK_API</a> <a class="el" href="SocketStatus_8h.htm#a7ea6036375503daef59eb4cb38ccdcaa">sfSocketStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="TcpSocket_8h.htm#aec570f5bb1a24918c85d05b305bb7523">sfTcpSocket_receivePacket</a> (<a class="el" href="Network_2Types_8h.htm#a30618a949f242924c3a6d1185c1b033f">sfTcpSocket</a> *socket, <a class="el" href="Network_2Types_8h.htm#a2a26ce53a9a6b6ab78807fd31aa32815">sfPacket</a> *packet)</td></tr>
+<tr class="memdesc:aec570f5bb1a24918c85d05b305bb7523"><td class="mdescLeft">&#160;</td><td class="mdescRight">Receive a formatted packet of data from the remote peer. <a href="#aec570f5bb1a24918c85d05b305bb7523"></a><br/></td></tr>
+<tr class="separator:aec570f5bb1a24918c85d05b305bb7523"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<h2 class="groupheader">Function Documentation</h2>
+<a class="anchor" id="a9c4184f1812234019fd72f6e59e97e80"></a>
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="Network_2Export_8h.htm#a957428faa4fd4d577529c669fedd3014">CSFML_NETWORK_API</a> <a class="el" href="SocketStatus_8h.htm#a7ea6036375503daef59eb4cb38ccdcaa">sfSocketStatus</a> sfTcpSocket_connect </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="Network_2Types_8h.htm#a30618a949f242924c3a6d1185c1b033f">sfTcpSocket</a> *&#160;</td>
+ <td class="paramname"><em>socket</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="structsfIpAddress.htm">sfIpAddress</a>&#160;</td>
+ <td class="paramname"><em>host</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">unsigned short&#160;</td>
+ <td class="paramname"><em>port</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="structsfTime.htm">sfTime</a>&#160;</td>
+ <td class="paramname"><em>timeout</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Connect a TCP socket to a remote peer. </p>
+<p>In blocking mode, this function may take a while, especially if the remote peer is not reachable. The last parameter allows you to stop trying to connect after a given timeout. If the socket was previously connected, it is first disconnected.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">socket</td><td>TCP socket object </td></tr>
+ <tr><td class="paramname">remoteAddress</td><td>Address of the remote peer </td></tr>
+ <tr><td class="paramname">remotePort</td><td>Port of the remote peer </td></tr>
+ <tr><td class="paramname">timeout</td><td>Maximum time to wait</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Status code </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a2e7a7f721c7131bc7a01d300c61fb96a"></a>
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="Network_2Export_8h.htm#a957428faa4fd4d577529c669fedd3014">CSFML_NETWORK_API</a> <a class="el" href="Network_2Types_8h.htm#a30618a949f242924c3a6d1185c1b033f">sfTcpSocket</a>* sfTcpSocket_create </td>
+ <td>(</td>
+ <td class="paramtype">void&#160;</td>
+ <td class="paramname"></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Create a new TCP socket. </p>
+<dl class="section return"><dt>Returns</dt><dd>A new sfTcpSocket object </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a5ccedadb6ebc020c3cbb37dbd049778b"></a>
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="Network_2Export_8h.htm#a957428faa4fd4d577529c669fedd3014">CSFML_NETWORK_API</a> void sfTcpSocket_destroy </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="Network_2Types_8h.htm#a30618a949f242924c3a6d1185c1b033f">sfTcpSocket</a> *&#160;</td>
+ <td class="paramname"><em>socket</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Destroy a TCP socket. </p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">socket</td><td>TCP socket to destroy </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a class="anchor" id="aac5cc7a607cf3a0eb26298cca3a9975f"></a>
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="Network_2Export_8h.htm#a957428faa4fd4d577529c669fedd3014">CSFML_NETWORK_API</a> void sfTcpSocket_disconnect </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="Network_2Types_8h.htm#a30618a949f242924c3a6d1185c1b033f">sfTcpSocket</a> *&#160;</td>
+ <td class="paramname"><em>socket</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Disconnect a TCP socket from its remote peer. </p>
+<p>This function gracefully closes the connection. If the socket is not connected, this function has no effect.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">socket</td><td>TCP socket object </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a class="anchor" id="a1ebf96d27670ca943a4b177ff332d23c"></a>
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="Network_2Export_8h.htm#a957428faa4fd4d577529c669fedd3014">CSFML_NETWORK_API</a> unsigned short sfTcpSocket_getLocalPort </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="Network_2Types_8h.htm#a30618a949f242924c3a6d1185c1b033f">sfTcpSocket</a> *&#160;</td>
+ <td class="paramname"><em>socket</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Get the port to which a TCP socket is bound locally. </p>
+<p>If the socket is not connected, this function returns 0.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">socket</td><td>TCP socket object</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Port to which the socket is bound </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="afb359983c56c78d5891a32740364ba52"></a>
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="Network_2Export_8h.htm#a957428faa4fd4d577529c669fedd3014">CSFML_NETWORK_API</a> <a class="el" href="structsfIpAddress.htm">sfIpAddress</a> sfTcpSocket_getRemoteAddress </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="Network_2Types_8h.htm#a30618a949f242924c3a6d1185c1b033f">sfTcpSocket</a> *&#160;</td>
+ <td class="paramname"><em>socket</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Get the address of the connected peer of a TCP socket. </p>
+<p>It the socket is not connected, this function returns sfIpAddress_None.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">socket</td><td>TCP socket object</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Address of the remote peer </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a853404b1381b6385a1217a6e75afc91b"></a>
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="Network_2Export_8h.htm#a957428faa4fd4d577529c669fedd3014">CSFML_NETWORK_API</a> unsigned short sfTcpSocket_getRemotePort </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="Network_2Types_8h.htm#a30618a949f242924c3a6d1185c1b033f">sfTcpSocket</a> *&#160;</td>
+ <td class="paramname"><em>socket</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Get the port of the connected peer to which a TCP socket is connected. </p>
+<p>If the socket is not connected, this function returns 0.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">socket</td><td>TCP socket object</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Remote port to which the socket is connected </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a75bb56edaaf054a581494c64b7eed4a8"></a>
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="Network_2Export_8h.htm#a957428faa4fd4d577529c669fedd3014">CSFML_NETWORK_API</a> <a class="el" href="Config_8h.htm#a7559f07a31bb3a4a3d865178ce4dc70b">sfBool</a> sfTcpSocket_isBlocking </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="Network_2Types_8h.htm#a30618a949f242924c3a6d1185c1b033f">sfTcpSocket</a> *&#160;</td>
+ <td class="paramname"><em>socket</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Tell whether a TCP socket is in blocking or non-blocking mode. </p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">socket</td><td>TCP socket object</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>sfTrue if the socket is blocking, sfFalse otherwise </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="aee28daf5169c0a5267f577335bc1d7ae"></a>
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="Network_2Export_8h.htm#a957428faa4fd4d577529c669fedd3014">CSFML_NETWORK_API</a> <a class="el" href="SocketStatus_8h.htm#a7ea6036375503daef59eb4cb38ccdcaa">sfSocketStatus</a> sfTcpSocket_receive </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="Network_2Types_8h.htm#a30618a949f242924c3a6d1185c1b033f">sfTcpSocket</a> *&#160;</td>
+ <td class="paramname"><em>socket</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">void *&#160;</td>
+ <td class="paramname"><em>data</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t&#160;</td>
+ <td class="paramname"><em>maxSize</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t *&#160;</td>
+ <td class="paramname"><em>sizeReceived</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Receive raw data from the remote peer of a TCP socket. </p>
+<p>In blocking mode, this function will wait until some bytes are actually received. This function will fail if the socket is not connected.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">socket</td><td>TCP socket object </td></tr>
+ <tr><td class="paramname">data</td><td>Pointer to the array to fill with the received bytes </td></tr>
+ <tr><td class="paramname">size</td><td>Maximum number of bytes that can be received </td></tr>
+ <tr><td class="paramname">received</td><td>This variable is filled with the actual number of bytes received</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Status code </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="aec570f5bb1a24918c85d05b305bb7523"></a>
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="Network_2Export_8h.htm#a957428faa4fd4d577529c669fedd3014">CSFML_NETWORK_API</a> <a class="el" href="SocketStatus_8h.htm#a7ea6036375503daef59eb4cb38ccdcaa">sfSocketStatus</a> sfTcpSocket_receivePacket </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="Network_2Types_8h.htm#a30618a949f242924c3a6d1185c1b033f">sfTcpSocket</a> *&#160;</td>
+ <td class="paramname"><em>socket</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="Network_2Types_8h.htm#a2a26ce53a9a6b6ab78807fd31aa32815">sfPacket</a> *&#160;</td>
+ <td class="paramname"><em>packet</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Receive a formatted packet of data from the remote peer. </p>
+<p>In blocking mode, this function will wait until the whole packet has been received. This function will fail if the socket is not connected.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">socket</td><td>TCP socket object </td></tr>
+ <tr><td class="paramname">packet</td><td>Packet to fill with the received data</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Status code </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="aeffdc58f74c32006760ca3f0b960911b"></a>
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="Network_2Export_8h.htm#a957428faa4fd4d577529c669fedd3014">CSFML_NETWORK_API</a> <a class="el" href="SocketStatus_8h.htm#a7ea6036375503daef59eb4cb38ccdcaa">sfSocketStatus</a> sfTcpSocket_send </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="Network_2Types_8h.htm#a30618a949f242924c3a6d1185c1b033f">sfTcpSocket</a> *&#160;</td>
+ <td class="paramname"><em>socket</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const void *&#160;</td>
+ <td class="paramname"><em>data</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t&#160;</td>
+ <td class="paramname"><em>size</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Send raw data to the remote peer of a TCP socket. </p>
+<p>This function will fail if the socket is not connected.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">socket</td><td>TCP socket object </td></tr>
+ <tr><td class="paramname">data</td><td>Pointer to the sequence of bytes to send </td></tr>
+ <tr><td class="paramname">size</td><td>Number of bytes to send</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Status code </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="aa1bcf582e4d66d89abf05ba20688e3ef"></a>
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="Network_2Export_8h.htm#a957428faa4fd4d577529c669fedd3014">CSFML_NETWORK_API</a> <a class="el" href="SocketStatus_8h.htm#a7ea6036375503daef59eb4cb38ccdcaa">sfSocketStatus</a> sfTcpSocket_sendPacket </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="Network_2Types_8h.htm#a30618a949f242924c3a6d1185c1b033f">sfTcpSocket</a> *&#160;</td>
+ <td class="paramname"><em>socket</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="Network_2Types_8h.htm#a2a26ce53a9a6b6ab78807fd31aa32815">sfPacket</a> *&#160;</td>
+ <td class="paramname"><em>packet</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Send a formatted packet of data to the remote peer of a TCP socket. </p>
+<p>This function will fail if the socket is not connected.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">socket</td><td>TCP socket object </td></tr>
+ <tr><td class="paramname">packet</td><td>Packet to send</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Status code </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a4b45f9e40dcf7879f165e8279de44237"></a>
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="Network_2Export_8h.htm#a957428faa4fd4d577529c669fedd3014">CSFML_NETWORK_API</a> void sfTcpSocket_setBlocking </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="Network_2Types_8h.htm#a30618a949f242924c3a6d1185c1b033f">sfTcpSocket</a> *&#160;</td>
+ <td class="paramname"><em>socket</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="Config_8h.htm#a7559f07a31bb3a4a3d865178ce4dc70b">sfBool</a>&#160;</td>
+ <td class="paramname"><em>blocking</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Set the blocking state of a TCP listener. </p>
+<p>In blocking mode, calls will not return until they have completed their task. For example, a call to sfTcpSocket_receive in blocking mode won't return until new data was actually received. In non-blocking mode, calls will always return immediately, using the return code to signal whether there was data available or not. By default, all sockets are blocking.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">socket</td><td>TCP socket object </td></tr>
+ <tr><td class="paramname">blocking</td><td>sfTrue to set the socket as blocking, sfFalse for non-blocking </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+</div><!-- contents -->
+ </div>
+ <div id="footer-container">
+ <div id="footer">
+ Copyright © Laurent Gomila &nbsp;::&nbsp;
+ Documentation generated by <a href="http://www.doxygen.org/" title="doxygen website">doxygen</a> &nbsp;::&nbsp;
+ </div>
+ </div>
+ </body>
+</html>