diff options
Diffstat (limited to 'doc/html/SocketUDP_8hpp-source.htm')
-rwxr-xr-x | doc/html/SocketUDP_8hpp-source.htm | 105 |
1 files changed, 56 insertions, 49 deletions
diff --git a/doc/html/SocketUDP_8hpp-source.htm b/doc/html/SocketUDP_8hpp-source.htm index 65ca440..4b93815 100755 --- a/doc/html/SocketUDP_8hpp-source.htm +++ b/doc/html/SocketUDP_8hpp-source.htm @@ -10,19 +10,25 @@ <div id="logo"> <img src="./logo.jpg" width="770" height="200" title="SFML home" alt="SFML logo" /> </div> -<!-- Generated by Doxygen 1.5.2 --> -<div class="tabs"> - <ul> - <li><a href="index.htm"><span>Main Page</span></a></li> - <li><a href="namespaces.htm"><span>Namespaces</span></a></li> - <li><a href="classes.htm"><span>Classes</span></a></li> - <li class="current"><a href="files.htm"><span>Files</span></a></li> - </ul> -</div> +<!-- Generated by Doxygen 1.5.8 --> +<div class="navigation" id="top"> + <div class="tabs"> + <ul> + <li><a href="index.htm"><span>Main Page</span></a></li> + <li><a href="namespaces.htm"><span>Namespaces</span></a></li> + <li><a href="annotated.htm"><span>Classes</span></a></li> + <li class="current"><a href="files.htm"><span>Files</span></a></li> + </ul> + </div> + <div class="tabs"> + <ul> + <li><a href="files.htm"><span>File List</span></a></li> + </ul> + </div> <h1>SocketUDP.hpp</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <a name="l00002"></a>00002 <span class="comment">//</span> <a name="l00003"></a>00003 <span class="comment">// SFML - Simple and Fast Multimedia Library</span> -<a name="l00004"></a>00004 <span class="comment">// Copyright (C) 2007-2008 Laurent Gomila (laurent.gom@gmail.com)</span> +<a name="l00004"></a>00004 <span class="comment">// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)</span> <a name="l00005"></a>00005 <span class="comment">//</span> <a name="l00006"></a>00006 <span class="comment">// This software is provided 'as-is', without any express or implied warranty.</span> <a name="l00007"></a>00007 <span class="comment">// In no event will the authors be held liable for any damages arising from the use of this software.</span> @@ -56,11 +62,11 @@ <a name="l00038"></a>00038 <span class="keyword">class </span>IPAddress; <a name="l00039"></a>00039 <span class="keyword">template</span> <<span class="keyword">typename</span>> <span class="keyword">class </span>Selector; <a name="l00040"></a>00040 -<a name="l00045"></a><a class="code" href="classsf_1_1SocketUDP.htm">00045</a> <span class="keyword">class </span>SFML_API SocketUDP +<a name="l00045"></a><a class="code" href="classsf_1_1SocketUDP.htm">00045</a> <span class="keyword">class </span>SFML_API <a class="code" href="classsf_1_1SocketUDP.htm" title="SocketUDP wraps a socket using UDP protocol to send data fastly (but with less safety)...">SocketUDP</a> <a name="l00046"></a>00046 { <a name="l00047"></a>00047 <span class="keyword">public</span> : <a name="l00048"></a>00048 -<a name="l00053"></a>00053 SocketUDP(); +<a name="l00053"></a>00053 <a class="code" href="classsf_1_1SocketUDP.htm" title="SocketUDP wraps a socket using UDP protocol to send data fastly (but with less safety)...">SocketUDP</a>(); <a name="l00054"></a>00054 <a name="l00062"></a>00062 <span class="keywordtype">void</span> SetBlocking(<span class="keywordtype">bool</span> Blocking); <a name="l00063"></a>00063 @@ -68,47 +74,48 @@ <a name="l00073"></a>00073 <a name="l00080"></a>00080 <span class="keywordtype">bool</span> Unbind(); <a name="l00081"></a>00081 -<a name="l00093"></a>00093 <a class="code" href="namespacesf_1_1Socket.htm#51bf0fd51057b98a10fbb866246176dc" title="Enumeration of status returned by socket functions.">Socket::Status</a> Send(<span class="keyword">const</span> <span class="keywordtype">char</span>* Data, std::size_t Size, <span class="keyword">const</span> <a class="code" href="classsf_1_1IPAddress.htm" title="IPAddress provides easy manipulation of IP v4 addresses.">IPAddress</a>& Address, <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> Port); +<a name="l00093"></a>00093 Socket::Status Send(<span class="keyword">const</span> <span class="keywordtype">char</span>* Data, std::size_t Size, <span class="keyword">const</span> <a class="code" href="classsf_1_1IPAddress.htm" title="IPAddress provides easy manipulation of IP v4 addresses.">IPAddress</a>& Address, <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> Port); <a name="l00094"></a>00094 -<a name="l00107"></a>00107 <a class="code" href="namespacesf_1_1Socket.htm#51bf0fd51057b98a10fbb866246176dc" title="Enumeration of status returned by socket functions.">Socket::Status</a> Receive(<span class="keywordtype">char</span>* Data, std::size_t MaxSize, std::size_t& SizeReceived, <a class="code" href="classsf_1_1IPAddress.htm" title="IPAddress provides easy manipulation of IP v4 addresses.">IPAddress</a>& Address); -<a name="l00108"></a>00108 -<a name="l00119"></a>00119 <a class="code" href="namespacesf_1_1Socket.htm#51bf0fd51057b98a10fbb866246176dc" title="Enumeration of status returned by socket functions.">Socket::Status</a> Send(<a class="code" href="classsf_1_1Packet.htm" title="Packet wraps data to send / to receive through the network.">Packet</a>& PacketToSend, <span class="keyword">const</span> <a class="code" href="classsf_1_1IPAddress.htm" title="IPAddress provides easy manipulation of IP v4 addresses.">IPAddress</a>& Address, <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> Port); -<a name="l00120"></a>00120 -<a name="l00131"></a>00131 <a class="code" href="namespacesf_1_1Socket.htm#51bf0fd51057b98a10fbb866246176dc" title="Enumeration of status returned by socket functions.">Socket::Status</a> Receive(<a class="code" href="classsf_1_1Packet.htm" title="Packet wraps data to send / to receive through the network.">Packet</a>& PacketToReceive, <a class="code" href="classsf_1_1IPAddress.htm" title="IPAddress provides easy manipulation of IP v4 addresses.">IPAddress</a>& Address); -<a name="l00132"></a>00132 -<a name="l00139"></a>00139 <span class="keywordtype">bool</span> Close(); -<a name="l00140"></a>00140 -<a name="l00148"></a>00148 <span class="keywordtype">bool</span> IsValid() <span class="keyword">const</span>; -<a name="l00149"></a>00149 -<a name="l00156"></a>00156 <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> GetPort() <span class="keyword">const</span>; -<a name="l00157"></a>00157 -<a name="l00166"></a>00166 <span class="keywordtype">bool</span> <a class="code" href="namespacesf.htm#eb2e9506aa20c13b065592724eafa1d7" title="Operator == overload ; compares the equality of two vectors.">operator ==</a>(<span class="keyword">const</span> SocketUDP& Other) <span class="keyword">const</span>; -<a name="l00167"></a>00167 -<a name="l00176"></a>00176 <span class="keywordtype">bool</span> <a class="code" href="namespacesf.htm#d34adb0b3cd1ff8176cd14eab6ffd7db" title="Operator != overload ; compares the difference of two vectors.">operator !=</a>(<span class="keyword">const</span> SocketUDP& Other) <span class="keyword">const</span>; -<a name="l00177"></a>00177 -<a name="l00188"></a>00188 <span class="keywordtype">bool</span> operator <(<span class="keyword">const</span> SocketUDP& Other) <span class="keyword">const</span>; -<a name="l00189"></a>00189 -<a name="l00190"></a>00190 <span class="keyword">private</span> : +<a name="l00108"></a>00108 Socket::Status Receive(<span class="keywordtype">char</span>* Data, std::size_t MaxSize, std::size_t& SizeReceived, <a class="code" href="classsf_1_1IPAddress.htm" title="IPAddress provides easy manipulation of IP v4 addresses.">IPAddress</a>& Address, <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span>& Port); +<a name="l00109"></a>00109 +<a name="l00120"></a>00120 Socket::Status Send(<a class="code" href="classsf_1_1Packet.htm" title="Packet wraps data to send / to receive through the network.">Packet</a>& PacketToSend, <span class="keyword">const</span> <a class="code" href="classsf_1_1IPAddress.htm" title="IPAddress provides easy manipulation of IP v4 addresses.">IPAddress</a>& Address, <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> Port); +<a name="l00121"></a>00121 +<a name="l00133"></a>00133 Socket::Status Receive(<a class="code" href="classsf_1_1Packet.htm" title="Packet wraps data to send / to receive through the network.">Packet</a>& PacketToReceive, <a class="code" href="classsf_1_1IPAddress.htm" title="IPAddress provides easy manipulation of IP v4 addresses.">IPAddress</a>& Address, <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span>& Port); +<a name="l00134"></a>00134 +<a name="l00141"></a>00141 <span class="keywordtype">bool</span> Close(); +<a name="l00142"></a>00142 +<a name="l00150"></a>00150 <span class="keywordtype">bool</span> IsValid() <span class="keyword">const</span>; +<a name="l00151"></a>00151 +<a name="l00158"></a>00158 <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> GetPort() <span class="keyword">const</span>; +<a name="l00159"></a>00159 +<a name="l00168"></a>00168 <span class="keywordtype">bool</span> operator ==(<span class="keyword">const</span> <a class="code" href="classsf_1_1SocketUDP.htm" title="SocketUDP wraps a socket using UDP protocol to send data fastly (but with less safety)...">SocketUDP</a>& Other) <span class="keyword">const</span>; +<a name="l00169"></a>00169 +<a name="l00178"></a>00178 <span class="keywordtype">bool</span> operator !=(<span class="keyword">const</span> <a class="code" href="classsf_1_1SocketUDP.htm" title="SocketUDP wraps a socket using UDP protocol to send data fastly (but with less safety)...">SocketUDP</a>& Other) <span class="keyword">const</span>; +<a name="l00179"></a>00179 +<a name="l00190"></a>00190 <span class="keywordtype">bool</span> operator <(<span class="keyword">const</span> <a class="code" href="classsf_1_1SocketUDP.htm" title="SocketUDP wraps a socket using UDP protocol to send data fastly (but with less safety)...">SocketUDP</a>& Other) <span class="keyword">const</span>; <a name="l00191"></a>00191 -<a name="l00192"></a><a class="code" href="classsf_1_1SocketUDP.htm#f750d7515f80120fe802531753208caf">00192</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classsf_1_1Selector.htm" title="Selector allow reading from multiple sockets without blocking.">Selector</a><SocketUDP>; +<a name="l00192"></a>00192 <span class="keyword">private</span> : <a name="l00193"></a>00193 -<a name="l00201"></a>00201 SocketUDP(<a class="code" href="classsf_1_1SocketHelper.htm#097d978a4a15af5f17089099edc23afa">SocketHelper::SocketType</a> Descriptor); -<a name="l00202"></a>00202 -<a name="l00209"></a>00209 <span class="keywordtype">void</span> Create(<a class="code" href="classsf_1_1SocketHelper.htm#097d978a4a15af5f17089099edc23afa">SocketHelper::SocketType</a> Descriptor = 0); -<a name="l00210"></a>00210 -<a name="l00212"></a>00212 <span class="comment">// Member data</span> -<a name="l00214"></a>00214 <span class="comment"></span> <a class="code" href="classsf_1_1SocketHelper.htm#097d978a4a15af5f17089099edc23afa">SocketHelper::SocketType</a> mySocket; -<a name="l00215"></a>00215 <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> myPort; -<a name="l00216"></a>00216 std::vector<char> myPendingPacket; -<a name="l00217"></a>00217 Int32 myPendingPacketSize; -<a name="l00218"></a>00218 <span class="keywordtype">bool</span> myIsBlocking; -<a name="l00219"></a>00219 }; -<a name="l00220"></a>00220 -<a name="l00221"></a>00221 } <span class="comment">// namespace sf</span> +<a name="l00194"></a>00194 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classsf_1_1Selector.htm" title="Selector allow reading from multiple sockets without blocking.">Selector</a><SocketUDP>; +<a name="l00195"></a>00195 +<a name="l00203"></a>00203 SocketUDP(SocketHelper::SocketType Descriptor); +<a name="l00204"></a>00204 +<a name="l00211"></a>00211 <span class="keywordtype">void</span> Create(SocketHelper::SocketType Descriptor = 0); +<a name="l00212"></a>00212 +<a name="l00214"></a>00214 <span class="comment">// Member data</span> +<a name="l00216"></a>00216 <span class="comment"></span> SocketHelper::SocketType mySocket; +<a name="l00217"></a>00217 <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> myPort; +<a name="l00218"></a>00218 std::vector<char> myPendingPacket; +<a name="l00219"></a>00219 Int32 myPendingPacketSize; +<a name="l00220"></a>00220 <span class="keywordtype">bool</span> myIsBlocking; +<a name="l00221"></a>00221 }; <a name="l00222"></a>00222 -<a name="l00223"></a>00223 -<a name="l00224"></a>00224 <span class="preprocessor">#endif // SFML_SOCKETUDP_HPP</span> -</pre></div> +<a name="l00223"></a>00223 } <span class="comment">// namespace sf</span> +<a name="l00224"></a>00224 +<a name="l00225"></a>00225 +<a name="l00226"></a>00226 <span class="preprocessor">#endif // SFML_SOCKETUDP_HPP</span> +</pre></div></div> + <p id="footer"> :: Copyright © 2007-2008 Laurent Gomila, all rights reserved :: Documentation generated by <a href="http://www.doxygen.org/" title="doxygen website">doxygen 1.5.2</a> :: |