Changeset 74 in flair-dev for trunk/doc/Flair/_tcp_socket_8h_source.html
- Timestamp:
- May 24, 2018, 11:46:38 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/Flair/_tcp_socket_8h_source.html
r68 r74 126 126 <div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  ~<a class="code" href="classflair_1_1core_1_1_tcp_socket.html">TcpSocket</a>();</div> 127 127 <div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  <span class="keywordtype">void</span> <a class="code" href="classflair_1_1core_1_1_tcp_socket.html#a7eaffe48d70e5119182bdb5846c6889d">Listen</a>(<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> port, <span class="keyword">const</span> std::string localAddress = <span class="stringliteral">"ANY"</span>);</div> 128 <div class="line"><a name="l00031"></a><span class="lineno"> 31</span>  <a class="code" href="classflair_1_1core_1_1_tcp_socket.html">TcpSocket</a> *<a class="code" href="classflair_1_1core_1_1_tcp_socket.html#a 55d90b894a14900d2a84a7772124727d">Accept</a>(</div>129 <div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  <a class="code" href="namespaceflair_1_1core.html#acc0fa041e08ecf73b2d1d723c339a736">Time</a> timeout = 0); <span class="comment">// should throw an exception if not a listening socket</span></div>130 <div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  <span class="keywordtype">bool</span> <a class="code" href="classflair_1_1core_1_1_tcp_socket.html#a c87b68e327a73dada17b3d93dab7929c">Connect</a>(<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> distantPort, <span class="keyword">const</span> std::string distantAddress,</div>131 <div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  <a class="code" href="namespaceflair_1_1core.html#acc0fa041e08ecf73b2d1d723c339a736">Time</a> timeout = 0); <span class="comment">// timeout in milliseconds</span></div>132 <div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  ssize_t <a class="code" href="classflair_1_1core_1_1_tcp_socket.html#a aca9be5ab271cef04af09219ff262f38">SendMessage</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *message, <span class="keywordtype">size_t</span> message_len,</div>133 <div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  <a class="code" href="namespaceflair_1_1core.html#acc0fa041e08ecf73b2d1d723c339a736">Time</a> timeout = 0); <span class="comment">// timeout in milliseconds</span></div>134 <div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  ssize_t <a class="code" href="classflair_1_1core_1_1_tcp_socket.html#ad7e7cf859d7cbe230a33f90c8c1bcfc2">RecvMessage</a>(<span class="keywordtype">char</span> *buf, <span class="keywordtype">size_t</span> buf_len,</div>135 <div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  <a class="code" href="namespaceflair_1_1core.html#acc0fa041e08ecf73b2d1d723c339a736">Time</a> timeout = 0); <span class="comment">// timeout in milliseconds</span></div>136 <div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  </div>137 <div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  uint 16_t <a class="code" href="classflair_1_1core_1_1_tcp_socket.html#a94921895eb0b474e967d611d78d630e2">NetworkToHost16</a>(uint16_t data);</div>138 <div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  uint 16_t HostToNetwork16(uint16_t data);</div>139 <div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  uint32_t NetworkToHost32(uint32_t data);</div>140 <div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  uint32_t HostToNetwork32(uint32_t data);</div>141 <div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  </div>142 <div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  <span class="keyword">private</span>:</div>143 <div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <span class="keywordtype"> int</span> socket; <span class="comment">// socket file descriptor</span></div>144 <div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <span class="keywordtype">bool</span> blockOnSend;</div>145 <div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  <span class="keywordtype">bool</span> blockOnReceive;</div>146 <div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  <span class="keywordtype"> bool</span> isConnected;</div>147 <div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> distantPort;</div>148 <div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  std::string distantAddress;</div>128 <div class="line"><a name="l00031"></a><span class="lineno"> 31</span>  <a class="code" href="classflair_1_1core_1_1_tcp_socket.html">TcpSocket</a> *<a class="code" href="classflair_1_1core_1_1_tcp_socket.html#af3ea9a03fb31fe36b604060e9386d617">Accept</a>(</div> 129 <div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  <a class="code" href="namespaceflair_1_1core.html#acc0fa041e08ecf73b2d1d723c339a736">Time</a> timeout = TIME_INFINITE);</div> 130 <div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  <span class="keywordtype">bool</span> <a class="code" href="classflair_1_1core_1_1_tcp_socket.html#aea4dd2ff49fc3e2ba8a3afcccedbc4af">Connect</a>(<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> distantPort, <span class="keyword">const</span> std::string distantAddress,</div> 131 <div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  <a class="code" href="namespaceflair_1_1core.html#acc0fa041e08ecf73b2d1d723c339a736">Time</a> timeout = TIME_INFINITE);</div> 132 <div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  ssize_t <a class="code" href="classflair_1_1core_1_1_tcp_socket.html#a35141127ad1e1fd921f5ca91e2341674">SendMessage</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *message, <span class="keywordtype">size_t</span> message_len, <a class="code" href="namespaceflair_1_1core.html#acc0fa041e08ecf73b2d1d723c339a736">Time</a> timeout = TIME_INFINITE);</div> 133 <div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  ssize_t <a class="code" href="classflair_1_1core_1_1_tcp_socket.html#a843ce6bee190e7840ca5554654ed580d">RecvMessage</a>(<span class="keywordtype">char</span> *buf, <span class="keywordtype">size_t</span> buf_len, <a class="code" href="namespaceflair_1_1core.html#acc0fa041e08ecf73b2d1d723c339a736">Time</a> timeout = TIME_INFINITE);</div> 134 <div class="line"><a name="l00037"></a><span class="lineno"> 37</span> </div> 135 <div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  uint16_t <a class="code" href="classflair_1_1core_1_1_tcp_socket.html#a94921895eb0b474e967d611d78d630e2">NetworkToHost16</a>(uint16_t data);</div> 136 <div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  uint16_t HostToNetwork16(uint16_t data);</div> 137 <div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  uint32_t NetworkToHost32(uint32_t data);</div> 138 <div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  uint32_t HostToNetwork32(uint32_t data);</div> 139 <div class="line"><a name="l00042"></a><span class="lineno"> 42</span> </div> 140 <div class="line"><a name="l00043"></a><span class="lineno"> 43</span> <span class="keyword">private</span>:</div> 141 <div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  <span class="keywordtype">int</span> socket; <span class="comment">// socket file descriptor</span></div> 142 <div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  <span class="keywordtype">bool</span> blockOnSend;</div> 143 <div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <span class="keywordtype">bool</span> blockOnReceive;</div> 144 <div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <span class="keywordtype">bool</span> isConnected;</div> 145 <div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  <span class="keywordtype">bool</span> isListening;</div> 146 <div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> distantPort;</div> 147 <div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  std::string distantAddress;</div> 148 <div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <span class="keywordtype">char</span> *sendRingBuffer, *recvRingBuffer;</div> 149 149 <div class="line"><a name="l00052"></a><span class="lineno"> 52</span> };</div> 150 150 <div class="line"><a name="l00053"></a><span class="lineno"> 53</span> </div> … … 159 159 <div class="ttc" id="classflair_1_1core_1_1_tcp_socket_html"><div class="ttname"><a href="classflair_1_1core_1_1_tcp_socket.html">flair::core::TcpSocket</a></div><div class="ttdoc">Class encapsulating a TCP socket. </div><div class="ttdef"><b>Definition:</b> TcpSocket.h:25</div></div> 160 160 <div class="ttc" id="_connected_socket_8h_html"><div class="ttname"><a href="_connected_socket_8h.html">ConnectedSocket.h</a></div><div class="ttdoc">Class defining a socket working in connected mode. </div></div> 161 <div class="ttc" id="classflair_1_1core_1_1_tcp_socket_html_ac87b68e327a73dada17b3d93dab7929c"><div class="ttname"><a href="classflair_1_1core_1_1_tcp_socket.html#ac87b68e327a73dada17b3d93dab7929c">flair::core::TcpSocket::Connect</a></div><div class="ttdeci">bool Connect(const unsigned int distantPort, const std::string distantAddress, Time timeout=0)</div><div class="ttdoc">Returns a socket connected to a distant host. </div></div>162 <div class="ttc" id="classflair_1_1core_1_1_tcp_socket_html_ad7e7cf859d7cbe230a33f90c8c1bcfc2"><div class="ttname"><a href="classflair_1_1core_1_1_tcp_socket.html#ad7e7cf859d7cbe230a33f90c8c1bcfc2">flair::core::TcpSocket::RecvMessage</a></div><div class="ttdeci">ssize_t RecvMessage(char *buf, size_t buf_len, Time timeout=0)</div><div class="ttdoc">Receive a message. </div></div>163 161 <div class="ttc" id="classflair_1_1core_1_1_tcp_socket_html_a7eaffe48d70e5119182bdb5846c6889d"><div class="ttname"><a href="classflair_1_1core_1_1_tcp_socket.html#a7eaffe48d70e5119182bdb5846c6889d">flair::core::TcpSocket::Listen</a></div><div class="ttdeci">void Listen(const unsigned int port, const std::string localAddress="ANY")</div><div class="ttdoc">Returns a socket which listens on a specific port/address. </div></div> 164 162 <div class="ttc" id="classflair_1_1core_1_1_tcp_socket_html_a94921895eb0b474e967d611d78d630e2"><div class="ttname"><a href="classflair_1_1core_1_1_tcp_socket.html#a94921895eb0b474e967d611d78d630e2">flair::core::TcpSocket::NetworkToHost16</a></div><div class="ttdeci">uint16_t NetworkToHost16(uint16_t data)</div><div class="ttdoc">! See Socket.h for a more generic implementation of network/host endianness </div></div> 165 <div class="ttc" id="classflair_1_1core_1_1_tcp_socket_html_aaca9be5ab271cef04af09219ff262f38"><div class="ttname"><a href="classflair_1_1core_1_1_tcp_socket.html#aaca9be5ab271cef04af09219ff262f38">flair::core::TcpSocket::SendMessage</a></div><div class="ttdeci">ssize_t SendMessage(const char *message, size_t message_len, Time timeout=0)</div><div class="ttdoc">Send a message. </div></div> 166 <div class="ttc" id="classflair_1_1core_1_1_tcp_socket_html_a55d90b894a14900d2a84a7772124727d"><div class="ttname"><a href="classflair_1_1core_1_1_tcp_socket.html#a55d90b894a14900d2a84a7772124727d">flair::core::TcpSocket::Accept</a></div><div class="ttdeci">TcpSocket * Accept(Time timeout=0)</div><div class="ttdoc">Returns a socket on a new incoming connexion. </div></div> 163 <div class="ttc" id="classflair_1_1core_1_1_tcp_socket_html_a843ce6bee190e7840ca5554654ed580d"><div class="ttname"><a href="classflair_1_1core_1_1_tcp_socket.html#a843ce6bee190e7840ca5554654ed580d">flair::core::TcpSocket::RecvMessage</a></div><div class="ttdeci">ssize_t RecvMessage(char *buf, size_t buf_len, Time timeout=TIME_INFINITE)</div><div class="ttdoc">Receive a message. </div></div> 164 <div class="ttc" id="classflair_1_1core_1_1_tcp_socket_html_aea4dd2ff49fc3e2ba8a3afcccedbc4af"><div class="ttname"><a href="classflair_1_1core_1_1_tcp_socket.html#aea4dd2ff49fc3e2ba8a3afcccedbc4af">flair::core::TcpSocket::Connect</a></div><div class="ttdeci">bool Connect(const unsigned int distantPort, const std::string distantAddress, Time timeout=TIME_INFINITE)</div><div class="ttdoc">Returns a socket connected to a distant host. </div></div> 165 <div class="ttc" id="classflair_1_1core_1_1_tcp_socket_html_af3ea9a03fb31fe36b604060e9386d617"><div class="ttname"><a href="classflair_1_1core_1_1_tcp_socket.html#af3ea9a03fb31fe36b604060e9386d617">flair::core::TcpSocket::Accept</a></div><div class="ttdeci">TcpSocket * Accept(Time timeout=TIME_INFINITE)</div><div class="ttdoc">Returns a socket on a new incoming connexion. </div></div> 166 <div class="ttc" id="classflair_1_1core_1_1_tcp_socket_html_a35141127ad1e1fd921f5ca91e2341674"><div class="ttname"><a href="classflair_1_1core_1_1_tcp_socket.html#a35141127ad1e1fd921f5ca91e2341674">flair::core::TcpSocket::SendMessage</a></div><div class="ttdeci">ssize_t SendMessage(const char *message, size_t message_len, Time timeout=TIME_INFINITE)</div><div class="ttdoc">Send a message waiting up to timeout ns. </div></div> 167 167 </div><!-- fragment --></div><!-- contents --> 168 168 </div><!-- doc-content --> … … 171 171 <ul> 172 172 <li class="navelem"><a class="el" href="dir_33c2ee9b1665499374b4225c427cf176.html">igep</a></li><li class="navelem"><a class="el" href="dir_f1fe274389177bd7e17de7949c4ffada.html">flair-src</a></li><li class="navelem"><a class="el" href="dir_3ef62148cf94871b4b6ee5d6e3a989c1.html">lib</a></li><li class="navelem"><a class="el" href="dir_97265977dbbd48c696782ccac102bad5.html">FlairCore</a></li><li class="navelem"><a class="el" href="dir_6c198461db290ac9abcdd44184573216.html">src</a></li><li class="navelem"><a class="el" href="_tcp_socket_8h.html">TcpSocket.h</a></li> 173 <li class="footer">Generated on Fri Feb 23 2018 11:15:45for Flair by173 <li class="footer">Generated on Wed May 16 2018 07:14:13 for Flair by 174 174 <a href="http://www.doxygen.org/index.html"> 175 175 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.9.1 </li>
Note:
See TracChangeset
for help on using the changeset viewer.