summaryrefslogtreecommitdiff
path: root/libghack/CSFML-2.1-windows-32bits/CSFML-2.1/doc/html/UdpSocket_8h.htm
diff options
context:
space:
mode:
Diffstat (limited to 'libghack/CSFML-2.1-windows-32bits/CSFML-2.1/doc/html/UdpSocket_8h.htm')
-rwxr-xr-xlibghack/CSFML-2.1-windows-32bits/CSFML-2.1/doc/html/UdpSocket_8h.htm533
1 files changed, 533 insertions, 0 deletions
diff --git a/libghack/CSFML-2.1-windows-32bits/CSFML-2.1/doc/html/UdpSocket_8h.htm b/libghack/CSFML-2.1-windows-32bits/CSFML-2.1/doc/html/UdpSocket_8h.htm
new file mode 100755
index 0000000..751a54c
--- /dev/null
+++ b/libghack/CSFML-2.1-windows-32bits/CSFML-2.1/doc/html/UdpSocket_8h.htm
@@ -0,0 +1,533 @@
+<!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">UdpSocket.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;stddef.h&gt;</code><br/>
+</div>
+<p><a href="UdpSocket_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:af649392c41ece776fd7ec56217639615"><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#ae433fd1f2b3e8fb2c8d2f485d1e785f1">sfUdpSocket</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="UdpSocket_8h.htm#af649392c41ece776fd7ec56217639615">sfUdpSocket_create</a> (void)</td></tr>
+<tr class="memdesc:af649392c41ece776fd7ec56217639615"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new UDP socket. <a href="#af649392c41ece776fd7ec56217639615"></a><br/></td></tr>
+<tr class="separator:af649392c41ece776fd7ec56217639615"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:afac1437f83c9a385a3f43db52aa9234d"><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="UdpSocket_8h.htm#afac1437f83c9a385a3f43db52aa9234d">sfUdpSocket_destroy</a> (<a class="el" href="Network_2Types_8h.htm#ae433fd1f2b3e8fb2c8d2f485d1e785f1">sfUdpSocket</a> *socket)</td></tr>
+<tr class="memdesc:afac1437f83c9a385a3f43db52aa9234d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy a UDP socket. <a href="#afac1437f83c9a385a3f43db52aa9234d"></a><br/></td></tr>
+<tr class="separator:afac1437f83c9a385a3f43db52aa9234d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ad7afb7be44883236277629efe74ddb44"><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="UdpSocket_8h.htm#ad7afb7be44883236277629efe74ddb44">sfUdpSocket_setBlocking</a> (<a class="el" href="Network_2Types_8h.htm#ae433fd1f2b3e8fb2c8d2f485d1e785f1">sfUdpSocket</a> *socket, <a class="el" href="Config_8h.htm#a7559f07a31bb3a4a3d865178ce4dc70b">sfBool</a> blocking)</td></tr>
+<tr class="memdesc:ad7afb7be44883236277629efe74ddb44"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the blocking state of a UDP listener. <a href="#ad7afb7be44883236277629efe74ddb44"></a><br/></td></tr>
+<tr class="separator:ad7afb7be44883236277629efe74ddb44"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ad3cb760bad25d3aa38c23e0f22ff49cf"><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="UdpSocket_8h.htm#ad3cb760bad25d3aa38c23e0f22ff49cf">sfUdpSocket_isBlocking</a> (const <a class="el" href="Network_2Types_8h.htm#ae433fd1f2b3e8fb2c8d2f485d1e785f1">sfUdpSocket</a> *socket)</td></tr>
+<tr class="memdesc:ad3cb760bad25d3aa38c23e0f22ff49cf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tell whether a UDP socket is in blocking or non-blocking mode. <a href="#ad3cb760bad25d3aa38c23e0f22ff49cf"></a><br/></td></tr>
+<tr class="separator:ad3cb760bad25d3aa38c23e0f22ff49cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ae343b0527f28b4ccb70c1e959a84ba76"><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="UdpSocket_8h.htm#ae343b0527f28b4ccb70c1e959a84ba76">sfUdpSocket_getLocalPort</a> (const <a class="el" href="Network_2Types_8h.htm#ae433fd1f2b3e8fb2c8d2f485d1e785f1">sfUdpSocket</a> *socket)</td></tr>
+<tr class="memdesc:ae343b0527f28b4ccb70c1e959a84ba76"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the port to which a UDP socket is bound locally. <a href="#ae343b0527f28b4ccb70c1e959a84ba76"></a><br/></td></tr>
+<tr class="separator:ae343b0527f28b4ccb70c1e959a84ba76"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a277b0694d66511783f9907975793dae6"><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="UdpSocket_8h.htm#a277b0694d66511783f9907975793dae6">sfUdpSocket_bind</a> (<a class="el" href="Network_2Types_8h.htm#ae433fd1f2b3e8fb2c8d2f485d1e785f1">sfUdpSocket</a> *socket, unsigned short port)</td></tr>
+<tr class="memdesc:a277b0694d66511783f9907975793dae6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bind a UDP socket to a specific port. <a href="#a277b0694d66511783f9907975793dae6"></a><br/></td></tr>
+<tr class="separator:a277b0694d66511783f9907975793dae6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a800776e415ce2705d0b9a71736d4d71c"><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="UdpSocket_8h.htm#a800776e415ce2705d0b9a71736d4d71c">sfUdpSocket_unbind</a> (<a class="el" href="Network_2Types_8h.htm#ae433fd1f2b3e8fb2c8d2f485d1e785f1">sfUdpSocket</a> *socket)</td></tr>
+<tr class="memdesc:a800776e415ce2705d0b9a71736d4d71c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unbind a UDP socket from the local port to which it is bound. <a href="#a800776e415ce2705d0b9a71736d4d71c"></a><br/></td></tr>
+<tr class="separator:a800776e415ce2705d0b9a71736d4d71c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ac31401cdf413cbe5fde7d8d2e2a2dadc"><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="UdpSocket_8h.htm#ac31401cdf413cbe5fde7d8d2e2a2dadc">sfUdpSocket_send</a> (<a class="el" href="Network_2Types_8h.htm#ae433fd1f2b3e8fb2c8d2f485d1e785f1">sfUdpSocket</a> *socket, const void *data, size_t size, <a class="el" href="structsfIpAddress.htm">sfIpAddress</a> address, unsigned short port)</td></tr>
+<tr class="memdesc:ac31401cdf413cbe5fde7d8d2e2a2dadc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send raw data to a remote peer with a UDP socket. <a href="#ac31401cdf413cbe5fde7d8d2e2a2dadc"></a><br/></td></tr>
+<tr class="separator:ac31401cdf413cbe5fde7d8d2e2a2dadc"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a80106b3d8ad72364b2774fecdcaf8553"><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="UdpSocket_8h.htm#a80106b3d8ad72364b2774fecdcaf8553">sfUdpSocket_receive</a> (<a class="el" href="Network_2Types_8h.htm#ae433fd1f2b3e8fb2c8d2f485d1e785f1">sfUdpSocket</a> *socket, void *data, size_t maxSize, size_t *sizeReceived, <a class="el" href="structsfIpAddress.htm">sfIpAddress</a> *address, unsigned short *port)</td></tr>
+<tr class="memdesc:a80106b3d8ad72364b2774fecdcaf8553"><td class="mdescLeft">&#160;</td><td class="mdescRight">Receive raw data from a remote peer with a UDP socket. <a href="#a80106b3d8ad72364b2774fecdcaf8553"></a><br/></td></tr>
+<tr class="separator:a80106b3d8ad72364b2774fecdcaf8553"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a396b459d2c7c555998faa3b349f12aa4"><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="UdpSocket_8h.htm#a396b459d2c7c555998faa3b349f12aa4">sfUdpSocket_sendPacket</a> (<a class="el" href="Network_2Types_8h.htm#ae433fd1f2b3e8fb2c8d2f485d1e785f1">sfUdpSocket</a> *socket, <a class="el" href="Network_2Types_8h.htm#a2a26ce53a9a6b6ab78807fd31aa32815">sfPacket</a> *packet, <a class="el" href="structsfIpAddress.htm">sfIpAddress</a> address, unsigned short port)</td></tr>
+<tr class="memdesc:a396b459d2c7c555998faa3b349f12aa4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send a formatted packet of data to a remote peer with a UDP socket. <a href="#a396b459d2c7c555998faa3b349f12aa4"></a><br/></td></tr>
+<tr class="separator:a396b459d2c7c555998faa3b349f12aa4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a71868a2da0677442bf9366182a0ea8b4"><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="UdpSocket_8h.htm#a71868a2da0677442bf9366182a0ea8b4">sfUdpSocket_receivePacket</a> (<a class="el" href="Network_2Types_8h.htm#ae433fd1f2b3e8fb2c8d2f485d1e785f1">sfUdpSocket</a> *socket, <a class="el" href="Network_2Types_8h.htm#a2a26ce53a9a6b6ab78807fd31aa32815">sfPacket</a> *packet, <a class="el" href="structsfIpAddress.htm">sfIpAddress</a> *address, unsigned short *port)</td></tr>
+<tr class="memdesc:a71868a2da0677442bf9366182a0ea8b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Receive a formatted packet of data from a remote peer with a UDP socket. <a href="#a71868a2da0677442bf9366182a0ea8b4"></a><br/></td></tr>
+<tr class="separator:a71868a2da0677442bf9366182a0ea8b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a68b62f968f64978bf08d64421af81c28"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Network_2Export_8h.htm#a957428faa4fd4d577529c669fedd3014">CSFML_NETWORK_API</a> unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="UdpSocket_8h.htm#a68b62f968f64978bf08d64421af81c28">sfUdpSocket_maxDatagramSize</a> ()</td></tr>
+<tr class="memdesc:a68b62f968f64978bf08d64421af81c28"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the maximum number of bytes that can be sent in a single UDP datagram. <a href="#a68b62f968f64978bf08d64421af81c28"></a><br/></td></tr>
+<tr class="separator:a68b62f968f64978bf08d64421af81c28"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<h2 class="groupheader">Function Documentation</h2>
+<a class="anchor" id="a277b0694d66511783f9907975793dae6"></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> sfUdpSocket_bind </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="Network_2Types_8h.htm#ae433fd1f2b3e8fb2c8d2f485d1e785f1">sfUdpSocket</a> *&#160;</td>
+ <td class="paramname"><em>socket</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">unsigned short&#160;</td>
+ <td class="paramname"><em>port</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Bind a UDP socket to a specific port. </p>
+<p>Binding the socket to a port is necessary for being able to receive data on that port. You can use the special value 0 to tell the system to automatically pick an available port, and then call sfUdpSocket_getLocalPort to retrieve the chosen port.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">socket</td><td>UDP socket object </td></tr>
+ <tr><td class="paramname">port</td><td>Port to bind the socket to</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Status code </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="af649392c41ece776fd7ec56217639615"></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#ae433fd1f2b3e8fb2c8d2f485d1e785f1">sfUdpSocket</a>* sfUdpSocket_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 UDP socket. </p>
+<dl class="section return"><dt>Returns</dt><dd>A new sfUdpSocket object </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="afac1437f83c9a385a3f43db52aa9234d"></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 sfUdpSocket_destroy </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="Network_2Types_8h.htm#ae433fd1f2b3e8fb2c8d2f485d1e785f1">sfUdpSocket</a> *&#160;</td>
+ <td class="paramname"><em>socket</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Destroy a UDP socket. </p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">socket</td><td>UDP socket to destroy </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a class="anchor" id="ae343b0527f28b4ccb70c1e959a84ba76"></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 sfUdpSocket_getLocalPort </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="Network_2Types_8h.htm#ae433fd1f2b3e8fb2c8d2f485d1e785f1">sfUdpSocket</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 UDP socket is bound locally. </p>
+<p>If the socket is not bound to a port, this function returns 0.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">socket</td><td>UDP 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="ad3cb760bad25d3aa38c23e0f22ff49cf"></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> sfUdpSocket_isBlocking </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="Network_2Types_8h.htm#ae433fd1f2b3e8fb2c8d2f485d1e785f1">sfUdpSocket</a> *&#160;</td>
+ <td class="paramname"><em>socket</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Tell whether a UDP 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>UDP 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="a68b62f968f64978bf08d64421af81c28"></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 int sfUdpSocket_maxDatagramSize </td>
+ <td>(</td>
+ <td class="paramname"></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Return the maximum number of bytes that can be sent in a single UDP datagram. </p>
+<dl class="section return"><dt>Returns</dt><dd>The maximum size of a UDP datagram (message) </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a80106b3d8ad72364b2774fecdcaf8553"></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> sfUdpSocket_receive </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="Network_2Types_8h.htm#ae433fd1f2b3e8fb2c8d2f485d1e785f1">sfUdpSocket</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>, </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>address</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">unsigned short *&#160;</td>
+ <td class="paramname"><em>port</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Receive raw data from a remote peer with a UDP socket. </p>
+<p>In blocking mode, this function will wait until some bytes are actually received. Be careful to use a buffer which is large enough for the data that you intend to receive, if it is too small then an error will be returned and <em>all</em> the data will be lost.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">socket</td><td>UDP 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>
+ <tr><td class="paramname">remoteAddress</td><td>Address of the peer that sent the data </td></tr>
+ <tr><td class="paramname">remotePort</td><td>Port of the peer that sent the data</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Status code </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a71868a2da0677442bf9366182a0ea8b4"></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> sfUdpSocket_receivePacket </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="Network_2Types_8h.htm#ae433fd1f2b3e8fb2c8d2f485d1e785f1">sfUdpSocket</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>, </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>address</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">unsigned short *&#160;</td>
+ <td class="paramname"><em>port</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 a remote peer with a UDP socket. </p>
+<p>In blocking mode, this function will wait until the whole packet has been received.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">packet</td><td>Packet to fill with the received data </td></tr>
+ <tr><td class="paramname">remoteAddress</td><td>Address of the peer that sent the data </td></tr>
+ <tr><td class="paramname">remotePort</td><td>Port of the peer that sent the data</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Status code </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="ac31401cdf413cbe5fde7d8d2e2a2dadc"></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> sfUdpSocket_send </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="Network_2Types_8h.htm#ae433fd1f2b3e8fb2c8d2f485d1e785f1">sfUdpSocket</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>, </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>address</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">unsigned short&#160;</td>
+ <td class="paramname"><em>port</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Send raw data to a remote peer with a UDP socket. </p>
+<p>Make sure that <em>size</em> is not greater than <a class="el" href="UdpSocket_8h.htm#a68b62f968f64978bf08d64421af81c28" title="Return the maximum number of bytes that can be sent in a single UDP datagram.">sfUdpSocket_maxDatagramSize()</a>, otherwise this function will fail and no data will be sent.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">socket</td><td>UDP 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>
+ <tr><td class="paramname">remoteAddress</td><td>Address of the receiver </td></tr>
+ <tr><td class="paramname">remotePort</td><td>Port of the receiver to send the data to</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Status code </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a396b459d2c7c555998faa3b349f12aa4"></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> sfUdpSocket_sendPacket </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="Network_2Types_8h.htm#ae433fd1f2b3e8fb2c8d2f485d1e785f1">sfUdpSocket</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>, </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>address</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">unsigned short&#160;</td>
+ <td class="paramname"><em>port</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 a remote peer with a UDP socket. </p>
+<p>Make sure that the packet size is not greater than <a class="el" href="UdpSocket_8h.htm#a68b62f968f64978bf08d64421af81c28" title="Return the maximum number of bytes that can be sent in a single UDP datagram.">sfUdpSocket_maxDatagramSize()</a>, otherwise this function will fail and no data will be sent.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">socket</td><td>UDP socket object </td></tr>
+ <tr><td class="paramname">packet</td><td>Packet to send </td></tr>
+ <tr><td class="paramname">remoteAddress</td><td>Address of the receiver </td></tr>
+ <tr><td class="paramname">remotePort</td><td>Port of the receiver to send the data to</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Status code </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="ad7afb7be44883236277629efe74ddb44"></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 sfUdpSocket_setBlocking </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="Network_2Types_8h.htm#ae433fd1f2b3e8fb2c8d2f485d1e785f1">sfUdpSocket</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 UDP listener. </p>
+<p>In blocking mode, calls will not return until they have completed their task. For example, a call to sfUDPSocket_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>UDP 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>
+<a class="anchor" id="a800776e415ce2705d0b9a71736d4d71c"></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 sfUdpSocket_unbind </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="Network_2Types_8h.htm#ae433fd1f2b3e8fb2c8d2f485d1e785f1">sfUdpSocket</a> *&#160;</td>
+ <td class="paramname"><em>socket</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Unbind a UDP socket from the local port to which it is bound. </p>
+<p>The port that the socket was previously using is immediately available after this function is called. If the socket is not bound to a port, this function has no effect.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">socket</td><td>UDP socket object </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>