vectozavr-shooter/SFML-VS32/doc/html/classsf_1_1Socket.html

477 lines
26 KiB
HTML
Raw Normal View History

2021-10-09 13:41:12 +03:00
<!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>SFML - Simple and Fast Multimedia Library</title>
<meta http-equiv="Content-Type" content="text/html;"/>
<meta charset="utf-8"/>
<!--<link rel='stylesheet' type='text/css' href="https://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic"/>-->
<link rel="stylesheet" type="text/css" href="doxygen.css" title="default" media="screen,print" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
</head>
<body>
<div id="banner-container">
<div id="banner">
<span id="sfml">SFML 2.5.1</span>
</div>
</div>
<div id="content">
<!-- Generated by Doxygen 1.8.14 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><b>sf</b></li><li class="navelem"><a class="el" href="classsf_1_1Socket.html">Socket</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-types">Protected Types</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="classsf_1_1Socket-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">sf::Socket Class Reference<div class="ingroups"><a class="el" href="group__network.html">Network module</a></div></div> </div>
</div><!--header-->
<div class="contents">
<p>Base class for all the socket types.
<a href="classsf_1_1Socket.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="Socket_8hpp_source.html">Socket.hpp</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for sf::Socket:</div>
<div class="dyncontent">
<div class="center">
<img src="classsf_1_1Socket.png" usemap="#sf::Socket_map" alt=""/>
<map id="sf::Socket_map" name="sf::Socket_map">
<area href="classsf_1_1NonCopyable.html" title="Utility class that makes any derived class non-copyable. " alt="sf::NonCopyable" shape="rect" coords="115,0,220,24"/>
<area href="classsf_1_1TcpListener.html" title="Socket that listens to new TCP connections. " alt="sf::TcpListener" shape="rect" coords="0,112,105,136"/>
<area href="classsf_1_1TcpSocket.html" title="Specialized socket using the TCP protocol. " alt="sf::TcpSocket" shape="rect" coords="115,112,220,136"/>
<area href="classsf_1_1UdpSocket.html" title="Specialized socket using the UDP protocol. " alt="sf::UdpSocket" shape="rect" coords="230,112,335,136"/>
</map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a51bf0fd51057b98a10fbb866246176dc"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Socket.html#a51bf0fd51057b98a10fbb866246176dc">Status</a> { <br />
&#160;&#160;<a class="el" href="classsf_1_1Socket.html#a51bf0fd51057b98a10fbb866246176dca1de3a85bc56d3ae85b3d0f3cfd04ae90">Done</a>,
<a class="el" href="classsf_1_1Socket.html#a51bf0fd51057b98a10fbb866246176dca8554848daae98f996e131bdeed076c09">NotReady</a>,
<a class="el" href="classsf_1_1Socket.html#a51bf0fd51057b98a10fbb866246176dca181c163fad2eaea927185d127c392706">Partial</a>,
<a class="el" href="classsf_1_1Socket.html#a51bf0fd51057b98a10fbb866246176dcab215141f756acdc23c67fad149710eb1">Disconnected</a>,
<br />
&#160;&#160;<a class="el" href="classsf_1_1Socket.html#a51bf0fd51057b98a10fbb866246176dca1dc9854433a28c22e192721179a2df5d">Error</a>
<br />
}</td></tr>
<tr class="memdesc:a51bf0fd51057b98a10fbb866246176dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Status codes that may be returned by socket functions. <a href="classsf_1_1Socket.html#a51bf0fd51057b98a10fbb866246176dc">More...</a><br /></td></tr>
<tr class="separator:a51bf0fd51057b98a10fbb866246176dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa3e6c984bcb81a35234dcc9cc8369d75"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="classsf_1_1Socket.html#aa3e6c984bcb81a35234dcc9cc8369d75a5a3c30fd128895403afc11076f461b19">AnyPort</a> = 0
}</td></tr>
<tr class="memdesc:aa3e6c984bcb81a35234dcc9cc8369d75"><td class="mdescLeft">&#160;</td><td class="mdescRight">Some special values used by sockets. <a href="classsf_1_1Socket.html#aa3e6c984bcb81a35234dcc9cc8369d75">More...</a><br /></td></tr>
<tr class="separator:aa3e6c984bcb81a35234dcc9cc8369d75"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a79a4b5918f0b34a2f8db449089694788"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Socket.html#a79a4b5918f0b34a2f8db449089694788">~Socket</a> ()</td></tr>
<tr class="memdesc:a79a4b5918f0b34a2f8db449089694788"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <a href="#a79a4b5918f0b34a2f8db449089694788">More...</a><br /></td></tr>
<tr class="separator:a79a4b5918f0b34a2f8db449089694788"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a165fc1423e281ea2714c70303d3a9782"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Socket.html#a165fc1423e281ea2714c70303d3a9782">setBlocking</a> (bool blocking)</td></tr>
<tr class="memdesc:a165fc1423e281ea2714c70303d3a9782"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the blocking state of the socket. <a href="#a165fc1423e281ea2714c70303d3a9782">More...</a><br /></td></tr>
<tr class="separator:a165fc1423e281ea2714c70303d3a9782"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab1ceca9ac114b8baeeda3b34a0aca468"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Socket.html#ab1ceca9ac114b8baeeda3b34a0aca468">isBlocking</a> () const</td></tr>
<tr class="memdesc:ab1ceca9ac114b8baeeda3b34a0aca468"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tell whether the socket is in blocking or non-blocking mode. <a href="#ab1ceca9ac114b8baeeda3b34a0aca468">More...</a><br /></td></tr>
<tr class="separator:ab1ceca9ac114b8baeeda3b34a0aca468"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-types"></a>
Protected Types</h2></td></tr>
<tr class="memitem:a5d3ff44e56e68f02816bb0fabc34adf8"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Socket.html#a5d3ff44e56e68f02816bb0fabc34adf8">Type</a> { <a class="el" href="classsf_1_1Socket.html#a5d3ff44e56e68f02816bb0fabc34adf8acc02e97e90234b957eaad4dff7f22214">Tcp</a>,
<a class="el" href="classsf_1_1Socket.html#a5d3ff44e56e68f02816bb0fabc34adf8a6ebf3094830db4820191a327f3cc6ce2">Udp</a>
}</td></tr>
<tr class="memdesc:a5d3ff44e56e68f02816bb0fabc34adf8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Types of protocols that the socket can use. <a href="classsf_1_1Socket.html#a5d3ff44e56e68f02816bb0fabc34adf8">More...</a><br /></td></tr>
<tr class="separator:a5d3ff44e56e68f02816bb0fabc34adf8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a80ffb47ec0bafc83af019055d3e6a303"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Socket.html#a80ffb47ec0bafc83af019055d3e6a303">Socket</a> (<a class="el" href="classsf_1_1Socket.html#a5d3ff44e56e68f02816bb0fabc34adf8">Type</a> type)</td></tr>
<tr class="memdesc:a80ffb47ec0bafc83af019055d3e6a303"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor. <a href="#a80ffb47ec0bafc83af019055d3e6a303">More...</a><br /></td></tr>
<tr class="separator:a80ffb47ec0bafc83af019055d3e6a303"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a675457784284ae2f5640bbbe16729393"><td class="memItemLeft" align="right" valign="top">SocketHandle&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Socket.html#a675457784284ae2f5640bbbe16729393">getHandle</a> () const</td></tr>
<tr class="memdesc:a675457784284ae2f5640bbbe16729393"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the internal handle of the socket. <a href="#a675457784284ae2f5640bbbe16729393">More...</a><br /></td></tr>
<tr class="separator:a675457784284ae2f5640bbbe16729393"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aafbe140f4b1921e0d19e88cf7a61dcbc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Socket.html#aafbe140f4b1921e0d19e88cf7a61dcbc">create</a> ()</td></tr>
<tr class="memdesc:aafbe140f4b1921e0d19e88cf7a61dcbc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create the internal representation of the socket. <a href="#aafbe140f4b1921e0d19e88cf7a61dcbc">More...</a><br /></td></tr>
<tr class="separator:aafbe140f4b1921e0d19e88cf7a61dcbc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af1dd898f7aa3ead7ff7b2d1c20e97781"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Socket.html#af1dd898f7aa3ead7ff7b2d1c20e97781">create</a> (SocketHandle handle)</td></tr>
<tr class="memdesc:af1dd898f7aa3ead7ff7b2d1c20e97781"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create the internal representation of the socket from a socket handle. <a href="#af1dd898f7aa3ead7ff7b2d1c20e97781">More...</a><br /></td></tr>
<tr class="separator:af1dd898f7aa3ead7ff7b2d1c20e97781"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a71f2f5c2aa99e01cafe824fee4c573be"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Socket.html#a71f2f5c2aa99e01cafe824fee4c573be">close</a> ()</td></tr>
<tr class="memdesc:a71f2f5c2aa99e01cafe824fee4c573be"><td class="mdescLeft">&#160;</td><td class="mdescRight">Close the socket gracefully. <a href="#a71f2f5c2aa99e01cafe824fee4c573be">More...</a><br /></td></tr>
<tr class="separator:a71f2f5c2aa99e01cafe824fee4c573be"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a23fafd48278ea4f8f9c25f1f0f43693c"><td class="memItemLeft" align="right" valign="top"><a id="a23fafd48278ea4f8f9c25f1f0f43693c"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>SocketSelector</b></td></tr>
<tr class="separator:a23fafd48278ea4f8f9c25f1f0f43693c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Base class for all the socket types. </p>
<p>This class mainly defines internal stuff to be used by derived classes.</p>
<p>The only public features that it defines, and which is therefore common to all the socket classes, is the blocking state. All sockets can be set as blocking or non-blocking.</p>
<p>In blocking mode, socket functions will hang until the operation completes, which means that the entire program (well, in fact the current thread if you use multiple ones) will be stuck waiting for your socket operation to complete.</p>
<p>In non-blocking mode, all the socket functions will return immediately. If the socket is not ready to complete the requested operation, the function simply returns the proper status code (<a class="el" href="classsf_1_1Socket.html#a51bf0fd51057b98a10fbb866246176dca8554848daae98f996e131bdeed076c09" title="The socket is not ready to send / receive data yet. ">Socket::NotReady</a>).</p>
<p>The default mode, which is blocking, is the one that is generally used, in combination with threads or selectors. The non-blocking mode is rather used in real-time applications that run an endless loop that can poll the socket often enough, and cannot afford blocking this loop.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1TcpListener.html" title="Socket that listens to new TCP connections. ">sf::TcpListener</a>, <a class="el" href="classsf_1_1TcpSocket.html" title="Specialized socket using the TCP protocol. ">sf::TcpSocket</a>, <a class="el" href="classsf_1_1UdpSocket.html" title="Specialized socket using the UDP protocol. ">sf::UdpSocket</a> </dd></dl>
<p class="definition">Definition at line <a class="el" href="Socket_8hpp_source.html#l00045">45</a> of file <a class="el" href="Socket_8hpp_source.html">Socket.hpp</a>.</p>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a id="aa3e6c984bcb81a35234dcc9cc8369d75"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa3e6c984bcb81a35234dcc9cc8369d75">&#9670;&nbsp;</a></span>anonymous enum</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">anonymous enum</td>
</tr>
</table>
</div><div class="memdoc">
<p>Some special values used by sockets. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="aa3e6c984bcb81a35234dcc9cc8369d75a5a3c30fd128895403afc11076f461b19"></a>AnyPort&#160;</td><td class="fielddoc"><p>Special value that tells the system to pick any available port. </p>
</td></tr>
</table>
<p class="definition">Definition at line <a class="el" href="Socket_8hpp_source.html#l00066">66</a> of file <a class="el" href="Socket_8hpp_source.html">Socket.hpp</a>.</p>
</div>
</div>
<a id="a51bf0fd51057b98a10fbb866246176dc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a51bf0fd51057b98a10fbb866246176dc">&#9670;&nbsp;</a></span>Status</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="classsf_1_1Socket.html#a51bf0fd51057b98a10fbb866246176dc">sf::Socket::Status</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Status codes that may be returned by socket functions. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a51bf0fd51057b98a10fbb866246176dca1de3a85bc56d3ae85b3d0f3cfd04ae90"></a>Done&#160;</td><td class="fielddoc"><p>The socket has sent / received the data. </p>
</td></tr>
<tr><td class="fieldname"><a id="a51bf0fd51057b98a10fbb866246176dca8554848daae98f996e131bdeed076c09"></a>NotReady&#160;</td><td class="fielddoc"><p>The socket is not ready to send / receive data yet. </p>
</td></tr>
<tr><td class="fieldname"><a id="a51bf0fd51057b98a10fbb866246176dca181c163fad2eaea927185d127c392706"></a>Partial&#160;</td><td class="fielddoc"><p>The socket sent a part of the data. </p>
</td></tr>
<tr><td class="fieldname"><a id="a51bf0fd51057b98a10fbb866246176dcab215141f756acdc23c67fad149710eb1"></a>Disconnected&#160;</td><td class="fielddoc"><p>The TCP socket has been disconnected. </p>
</td></tr>
<tr><td class="fieldname"><a id="a51bf0fd51057b98a10fbb866246176dca1dc9854433a28c22e192721179a2df5d"></a>Error&#160;</td><td class="fielddoc"><p>An unexpected error happened. </p>
</td></tr>
</table>
<p class="definition">Definition at line <a class="el" href="Socket_8hpp_source.html#l00053">53</a> of file <a class="el" href="Socket_8hpp_source.html">Socket.hpp</a>.</p>
</div>
</div>
<a id="a5d3ff44e56e68f02816bb0fabc34adf8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5d3ff44e56e68f02816bb0fabc34adf8">&#9670;&nbsp;</a></span>Type</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="classsf_1_1Socket.html#a5d3ff44e56e68f02816bb0fabc34adf8">sf::Socket::Type</a></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Types of protocols that the socket can use. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a5d3ff44e56e68f02816bb0fabc34adf8acc02e97e90234b957eaad4dff7f22214"></a>Tcp&#160;</td><td class="fielddoc"><p>TCP protocol. </p>
</td></tr>
<tr><td class="fieldname"><a id="a5d3ff44e56e68f02816bb0fabc34adf8a6ebf3094830db4820191a327f3cc6ce2"></a>Udp&#160;</td><td class="fielddoc"><p>UDP protocol. </p>
</td></tr>
</table>
<p class="definition">Definition at line <a class="el" href="Socket_8hpp_source.html#l00114">114</a> of file <a class="el" href="Socket_8hpp_source.html">Socket.hpp</a>.</p>
</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a79a4b5918f0b34a2f8db449089694788"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a79a4b5918f0b34a2f8db449089694788">&#9670;&nbsp;</a></span>~Socket()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual sf::Socket::~Socket </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Destructor. </p>
</div>
</div>
<a id="a80ffb47ec0bafc83af019055d3e6a303"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a80ffb47ec0bafc83af019055d3e6a303">&#9670;&nbsp;</a></span>Socket()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">sf::Socket::Socket </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classsf_1_1Socket.html#a5d3ff44e56e68f02816bb0fabc34adf8">Type</a>&#160;</td>
<td class="paramname"><em>type</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Default constructor. </p>
<p>This constructor can only be accessed by derived classes.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">type</td><td>Type of the socket (TCP or UDP) </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a71f2f5c2aa99e01cafe824fee4c573be"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a71f2f5c2aa99e01cafe824fee4c573be">&#9670;&nbsp;</a></span>close()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void sf::Socket::close </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Close the socket gracefully. </p>
<p>This function can only be accessed by derived classes. </p>
</div>
</div>
<a id="aafbe140f4b1921e0d19e88cf7a61dcbc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aafbe140f4b1921e0d19e88cf7a61dcbc">&#9670;&nbsp;</a></span>create() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void sf::Socket::create </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Create the internal representation of the socket. </p>
<p>This function can only be accessed by derived classes. </p>
</div>
</div>
<a id="af1dd898f7aa3ead7ff7b2d1c20e97781"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af1dd898f7aa3ead7ff7b2d1c20e97781">&#9670;&nbsp;</a></span>create() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void sf::Socket::create </td>
<td>(</td>
<td class="paramtype">SocketHandle&#160;</td>
<td class="paramname"><em>handle</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Create the internal representation of the socket from a socket handle. </p>
<p>This function can only be accessed by derived classes.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">handle</td><td>OS-specific handle of the socket to wrap </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a675457784284ae2f5640bbbe16729393"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a675457784284ae2f5640bbbe16729393">&#9670;&nbsp;</a></span>getHandle()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">SocketHandle sf::Socket::getHandle </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Return the internal handle of the socket. </p>
<p>The returned handle may be invalid if the socket was not created yet (or already destroyed). This function can only be accessed by derived classes.</p>
<dl class="section return"><dt>Returns</dt><dd>The internal (OS-specific) handle of the socket </dd></dl>
</div>
</div>
<a id="ab1ceca9ac114b8baeeda3b34a0aca468"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab1ceca9ac114b8baeeda3b34a0aca468">&#9670;&nbsp;</a></span>isBlocking()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool sf::Socket::isBlocking </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Tell whether the socket is in blocking or non-blocking mode. </p>
<dl class="section return"><dt>Returns</dt><dd>True if the socket is blocking, false otherwise</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Socket.html#a165fc1423e281ea2714c70303d3a9782" title="Set the blocking state of the socket. ">setBlocking</a> </dd></dl>
</div>
</div>
<a id="a165fc1423e281ea2714c70303d3a9782"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a165fc1423e281ea2714c70303d3a9782">&#9670;&nbsp;</a></span>setBlocking()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::Socket::setBlocking </td>
<td>(</td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>blocking</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the blocking state of the socket. </p>
<p>In blocking mode, calls will not return until they have completed their task. For example, a call to Receive in blocking mode won't return until some 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">blocking</td><td>True to set the socket as blocking, false for non-blocking</td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Socket.html#ab1ceca9ac114b8baeeda3b34a0aca468" title="Tell whether the socket is in blocking or non-blocking mode. ">isBlocking</a> </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="Socket_8hpp_source.html">Socket.hpp</a></li>
</ul>
</div><!-- contents -->
</div>
<div id="footer-container">
<div id="footer">
SFML is licensed under the terms and conditions of the <a href="https://www.sfml-dev.org/license.php">zlib/png license</a>.<br>
Copyright &copy; Laurent Gomila &nbsp;::&nbsp;
Documentation generated by <a href="http://www.doxygen.org/" title="doxygen website">doxygen</a> &nbsp;::&nbsp;
</div>
</div>
</body>
</html>