source: flair-dev/trunk/doc/Flair/classflair_1_1core_1_1_tcp_socket.html @ 15

Last change on this file since 15 was 15, checked in by Sanahuja Guillaume, 5 years ago

m

File size: 37.9 KB
Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<meta http-equiv="X-UA-Compatible" content="IE=9"/>
6<meta name="generator" content="Doxygen 1.8.7"/>
7<title>Flair: flair::core::TcpSocket Class Reference</title>
8<link href="tabs.css" rel="stylesheet" type="text/css"/>
9<script type="text/javascript" src="jquery.js"></script>
10<script type="text/javascript" src="dynsections.js"></script>
11<link href="navtree.css" rel="stylesheet" type="text/css"/>
12<script type="text/javascript" src="resize.js"></script>
13<script type="text/javascript" src="navtree.js"></script>
14<script type="text/javascript">
15  $(document).ready(initResizable);
16  $(window).load(resizeHeight);
17</script>
18<link href="search/search.css" rel="stylesheet" type="text/css"/>
19<script type="text/javascript" src="search/search.js"></script>
20<script type="text/javascript">
21  $(document).ready(function() { searchBox.OnSelectItem(0); });
22</script>
23<link href="doxygen.css" rel="stylesheet" type="text/css" />
24</head>
25<body>
26<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
27<div id="titlearea">
28<table cellspacing="0" cellpadding="0">
29 <tbody>
30 <tr style="height: 56px;">
31  <td id="projectlogo"><img alt="Logo" src="logo_hds.png"/></td>
32  <td style="padding-left: 0.5em;">
33   <div id="projectname">Flair
34   </div>
35   <div id="projectbrief">Framework Libre Air</div>
36  </td>
37 </tr>
38 </tbody>
39</table>
40</div>
41<!-- end header part -->
42<!-- Generated by Doxygen 1.8.7 -->
43<script type="text/javascript">
44var searchBox = new SearchBox("searchBox", "search",false,'Search');
45</script>
46  <div id="navrow1" class="tabs">
47    <ul class="tablist">
48      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
49      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
50      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
51      <li><a href="files.html"><span>Files</span></a></li>
52      <li>
53        <div id="MSearchBox" class="MSearchBoxInactive">
54        <span class="left">
55          <img id="MSearchSelect" src="search/mag_sel.png"
56               onmouseover="return searchBox.OnSearchSelectShow()"
57               onmouseout="return searchBox.OnSearchSelectHide()"
58               alt=""/>
59          <input type="text" id="MSearchField" value="Search" accesskey="S"
60               onfocus="searchBox.OnSearchFieldFocus(true)" 
61               onblur="searchBox.OnSearchFieldFocus(false)" 
62               onkeyup="searchBox.OnSearchFieldChange(event)"/>
63          </span><span class="right">
64            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
65          </span>
66        </div>
67      </li>
68    </ul>
69  </div>
70  <div id="navrow2" class="tabs2">
71    <ul class="tablist">
72      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
73      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
74      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
75      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
76    </ul>
77  </div>
78</div><!-- top -->
79<div id="side-nav" class="ui-resizable side-nav-resizable">
80  <div id="nav-tree">
81    <div id="nav-tree-contents">
82      <div id="nav-sync" class="sync"></div>
83    </div>
84  </div>
85  <div id="splitbar" style="-moz-user-select:none;" 
86       class="ui-resizable-handle">
87  </div>
88</div>
89<script type="text/javascript">
90$(document).ready(function(){initNavTree('classflair_1_1core_1_1_tcp_socket.html','');});
91</script>
92<div id="doc-content">
93<!-- window showing the filter options -->
94<div id="MSearchSelectWindow"
95     onmouseover="return searchBox.OnSearchSelectShow()"
96     onmouseout="return searchBox.OnSearchSelectHide()"
97     onkeydown="return searchBox.OnSearchSelectKey(event)">
98<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Properties</a></div>
99
100<!-- iframe showing the search results (closed by default) -->
101<div id="MSearchResultsWindow">
102<iframe src="javascript:void(0)" frameborder="0" 
103        name="MSearchResults" id="MSearchResults">
104</iframe>
105</div>
106
107<div class="header">
108  <div class="summary">
109<a href="#pub-methods">Public Member Functions</a> &#124;
110<a href="classflair_1_1core_1_1_tcp_socket-members.html">List of all members</a>  </div>
111  <div class="headertitle">
112<div class="title">flair::core::TcpSocket Class Reference</div>  </div>
113</div><!--header-->
114<div class="contents">
115
116<p>Class encapsulating a TCP socket. 
117 <a href="classflair_1_1core_1_1_tcp_socket.html#details">More...</a></p>
118
119<p><code>#include &lt;<a class="el" href="_tcp_socket_8h_source.html">TcpSocket.h</a>&gt;</code></p>
120<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
121  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for flair::core::TcpSocket:</div>
122<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
123</div>
124<div id="dynsection-0-content" class="dyncontent" style="display:none;">
125 <div class="center">
126  <img src="classflair_1_1core_1_1_tcp_socket.png" usemap="#flair::core::TcpSocket_map" alt=""/>
127  <map id="flair::core::TcpSocket_map" name="flair::core::TcpSocket_map">
128<area href="classflair_1_1core_1_1_connected_socket.html" title="Interface class encapsulating a connected socket. Preserves packets order and guaranty delivery..." alt="flair::core::ConnectedSocket" shape="rect" coords="0,56,171,80"/>
129<area href="classflair_1_1core_1_1_object.html" title="Base class for all Framework&#39;s classes. " alt="flair::core::Object" shape="rect" coords="0,0,171,24"/>
130</map>
131 </div></div>
132<table class="memberdecls">
133<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
134Public Member Functions</h2></td></tr>
135<tr class="memitem:aecfbf8141419a463979464307d8c31f4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aecfbf8141419a463979464307d8c31f4"></a>
136&#160;</td><td class="memItemRight" valign="bottom"><b>TcpSocket</b> (const <a class="el" href="classflair_1_1core_1_1_object.html">Object</a> *parent, const std::string name, bool blockOnSend=false, bool blockOnReceive=true)</td></tr>
137<tr class="separator:aecfbf8141419a463979464307d8c31f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
138<tr class="memitem:a7eaffe48d70e5119182bdb5846c6889d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflair_1_1core_1_1_tcp_socket.html#a7eaffe48d70e5119182bdb5846c6889d">Listen</a> (const unsigned int port, const std::string localAddress=&quot;ANY&quot;)</td></tr>
139<tr class="memdesc:a7eaffe48d70e5119182bdb5846c6889d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a socket which listens on a specific port/address.  <a href="#a7eaffe48d70e5119182bdb5846c6889d">More...</a><br /></td></tr>
140<tr class="separator:a7eaffe48d70e5119182bdb5846c6889d"><td class="memSeparator" colspan="2">&#160;</td></tr>
141<tr class="memitem:a55d90b894a14900d2a84a7772124727d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classflair_1_1core_1_1_tcp_socket.html">TcpSocket</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflair_1_1core_1_1_tcp_socket.html#a55d90b894a14900d2a84a7772124727d">Accept</a> (<a class="el" href="namespaceflair_1_1core.html#acc0fa041e08ecf73b2d1d723c339a736">Time</a> timeout=0)</td></tr>
142<tr class="memdesc:a55d90b894a14900d2a84a7772124727d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a socket on a new incoming connexion.  <a href="#a55d90b894a14900d2a84a7772124727d">More...</a><br /></td></tr>
143<tr class="separator:a55d90b894a14900d2a84a7772124727d"><td class="memSeparator" colspan="2">&#160;</td></tr>
144<tr class="memitem:ac87b68e327a73dada17b3d93dab7929c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflair_1_1core_1_1_tcp_socket.html#ac87b68e327a73dada17b3d93dab7929c">Connect</a> (const unsigned int distantPort, const std::string distantAddress, <a class="el" href="namespaceflair_1_1core.html#acc0fa041e08ecf73b2d1d723c339a736">Time</a> timeout=0)</td></tr>
145<tr class="memdesc:ac87b68e327a73dada17b3d93dab7929c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a socket connected to a distant host.  <a href="#ac87b68e327a73dada17b3d93dab7929c">More...</a><br /></td></tr>
146<tr class="separator:ac87b68e327a73dada17b3d93dab7929c"><td class="memSeparator" colspan="2">&#160;</td></tr>
147<tr class="memitem:aaca9be5ab271cef04af09219ff262f38"><td class="memItemLeft" align="right" valign="top">ssize_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflair_1_1core_1_1_tcp_socket.html#aaca9be5ab271cef04af09219ff262f38">SendMessage</a> (const char *message, size_t message_len, <a class="el" href="namespaceflair_1_1core.html#acc0fa041e08ecf73b2d1d723c339a736">Time</a> timeout=0)</td></tr>
148<tr class="memdesc:aaca9be5ab271cef04af09219ff262f38"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send a message.  <a href="#aaca9be5ab271cef04af09219ff262f38">More...</a><br /></td></tr>
149<tr class="separator:aaca9be5ab271cef04af09219ff262f38"><td class="memSeparator" colspan="2">&#160;</td></tr>
150<tr class="memitem:ad7e7cf859d7cbe230a33f90c8c1bcfc2"><td class="memItemLeft" align="right" valign="top">ssize_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflair_1_1core_1_1_tcp_socket.html#ad7e7cf859d7cbe230a33f90c8c1bcfc2">RecvMessage</a> (char *buf, size_t buf_len, <a class="el" href="namespaceflair_1_1core.html#acc0fa041e08ecf73b2d1d723c339a736">Time</a> timeout=0)</td></tr>
151<tr class="memdesc:ad7e7cf859d7cbe230a33f90c8c1bcfc2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Receive a message.  <a href="#ad7e7cf859d7cbe230a33f90c8c1bcfc2">More...</a><br /></td></tr>
152<tr class="separator:ad7e7cf859d7cbe230a33f90c8c1bcfc2"><td class="memSeparator" colspan="2">&#160;</td></tr>
153<tr class="memitem:a94921895eb0b474e967d611d78d630e2"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflair_1_1core_1_1_tcp_socket.html#a94921895eb0b474e967d611d78d630e2">NetworkToHost16</a> (uint16_t data)</td></tr>
154<tr class="memdesc:a94921895eb0b474e967d611d78d630e2"><td class="mdescLeft">&#160;</td><td class="mdescRight">! See <a class="el" href="_socket_8h.html" title="Class defining a UDP socket. ">Socket.h</a> for a more generic implementation of network/host endianness  <a href="#a94921895eb0b474e967d611d78d630e2">More...</a><br /></td></tr>
155<tr class="separator:a94921895eb0b474e967d611d78d630e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
156<tr class="memitem:a85ce14fc3ef83d4ddee6a80e79ade3e4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a85ce14fc3ef83d4ddee6a80e79ade3e4"></a>
157uint16_t&#160;</td><td class="memItemRight" valign="bottom"><b>HostToNetwork16</b> (uint16_t data)</td></tr>
158<tr class="separator:a85ce14fc3ef83d4ddee6a80e79ade3e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
159<tr class="memitem:a3eb6e2f90a6babfb95e4b38825673ba8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3eb6e2f90a6babfb95e4b38825673ba8"></a>
160uint32_t&#160;</td><td class="memItemRight" valign="bottom"><b>NetworkToHost32</b> (uint32_t data)</td></tr>
161<tr class="separator:a3eb6e2f90a6babfb95e4b38825673ba8"><td class="memSeparator" colspan="2">&#160;</td></tr>
162<tr class="memitem:ab74f735dfe4a984ee6940cd0c68f1b6e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab74f735dfe4a984ee6940cd0c68f1b6e"></a>
163uint32_t&#160;</td><td class="memItemRight" valign="bottom"><b>HostToNetwork32</b> (uint32_t data)</td></tr>
164<tr class="separator:ab74f735dfe4a984ee6940cd0c68f1b6e"><td class="memSeparator" colspan="2">&#160;</td></tr>
165<tr class="inherit_header pub_methods_classflair_1_1core_1_1_connected_socket"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classflair_1_1core_1_1_connected_socket')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classflair_1_1core_1_1_connected_socket.html">flair::core::ConnectedSocket</a></td></tr>
166<tr class="memitem:a61c0bbd4147f994cc2f0276cc6982447 inherit pub_methods_classflair_1_1core_1_1_connected_socket"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflair_1_1core_1_1_connected_socket.html#a61c0bbd4147f994cc2f0276cc6982447">ConnectedSocket</a> (const <a class="el" href="classflair_1_1core_1_1_object.html">Object</a> *parent, const std::string name)</td></tr>
167<tr class="memdesc:a61c0bbd4147f994cc2f0276cc6982447 inherit pub_methods_classflair_1_1core_1_1_connected_socket"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <a href="#a61c0bbd4147f994cc2f0276cc6982447">More...</a><br /></td></tr>
168<tr class="separator:a61c0bbd4147f994cc2f0276cc6982447 inherit pub_methods_classflair_1_1core_1_1_connected_socket"><td class="memSeparator" colspan="2">&#160;</td></tr>
169<tr class="memitem:ad4e96a4fead5a5a1c038a31fa7dfd36b inherit pub_methods_classflair_1_1core_1_1_connected_socket"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflair_1_1core_1_1_connected_socket.html#ad4e96a4fead5a5a1c038a31fa7dfd36b">~ConnectedSocket</a> ()</td></tr>
170<tr class="memdesc:ad4e96a4fead5a5a1c038a31fa7dfd36b inherit pub_methods_classflair_1_1core_1_1_connected_socket"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <a href="#ad4e96a4fead5a5a1c038a31fa7dfd36b">More...</a><br /></td></tr>
171<tr class="separator:ad4e96a4fead5a5a1c038a31fa7dfd36b inherit pub_methods_classflair_1_1core_1_1_connected_socket"><td class="memSeparator" colspan="2">&#160;</td></tr>
172<tr class="memitem:a0b9c506b8cb481d90e00c487bf48a169 inherit pub_methods_classflair_1_1core_1_1_connected_socket"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0b9c506b8cb481d90e00c487bf48a169"></a>
173std::string&#160;</td><td class="memItemRight" valign="bottom"><b>ReadString</b> (const size_t &amp;stringLength, <a class="el" href="namespaceflair_1_1core.html#acc0fa041e08ecf73b2d1d723c339a736">Time</a> timeout)</td></tr>
174<tr class="separator:a0b9c506b8cb481d90e00c487bf48a169 inherit pub_methods_classflair_1_1core_1_1_connected_socket"><td class="memSeparator" colspan="2">&#160;</td></tr>
175<tr class="memitem:ac3de6fad3ddd34fb7f9928e04abdc746 inherit pub_methods_classflair_1_1core_1_1_connected_socket"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac3de6fad3ddd34fb7f9928e04abdc746"></a>
176uint16_t&#160;</td><td class="memItemRight" valign="bottom"><b>ReadUInt16</b> (<a class="el" href="namespaceflair_1_1core.html#acc0fa041e08ecf73b2d1d723c339a736">Time</a> const &amp;timeout)</td></tr>
177<tr class="separator:ac3de6fad3ddd34fb7f9928e04abdc746 inherit pub_methods_classflair_1_1core_1_1_connected_socket"><td class="memSeparator" colspan="2">&#160;</td></tr>
178<tr class="memitem:aad9de20aee680674861f6ee216a12c82 inherit pub_methods_classflair_1_1core_1_1_connected_socket"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aad9de20aee680674861f6ee216a12c82"></a>
179void&#160;</td><td class="memItemRight" valign="bottom"><b>WriteUInt16</b> (uint16_t const &amp;data, <a class="el" href="namespaceflair_1_1core.html#acc0fa041e08ecf73b2d1d723c339a736">Time</a> const &amp;timeout)</td></tr>
180<tr class="separator:aad9de20aee680674861f6ee216a12c82 inherit pub_methods_classflair_1_1core_1_1_connected_socket"><td class="memSeparator" colspan="2">&#160;</td></tr>
181<tr class="memitem:ae718da5dcb14ba66ef03c645c922b9cb inherit pub_methods_classflair_1_1core_1_1_connected_socket"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae718da5dcb14ba66ef03c645c922b9cb"></a>
182uint32_t&#160;</td><td class="memItemRight" valign="bottom"><b>ReadUInt32</b> (<a class="el" href="namespaceflair_1_1core.html#acc0fa041e08ecf73b2d1d723c339a736">Time</a> const &amp;timeout)</td></tr>
183<tr class="separator:ae718da5dcb14ba66ef03c645c922b9cb inherit pub_methods_classflair_1_1core_1_1_connected_socket"><td class="memSeparator" colspan="2">&#160;</td></tr>
184<tr class="memitem:a74f5b08f78dd97aea132bcdfe2cb191c inherit pub_methods_classflair_1_1core_1_1_connected_socket"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a74f5b08f78dd97aea132bcdfe2cb191c"></a>
185void&#160;</td><td class="memItemRight" valign="bottom"><b>WriteUInt32</b> (uint32_t const &amp;data, <a class="el" href="namespaceflair_1_1core.html#acc0fa041e08ecf73b2d1d723c339a736">Time</a> const &amp;timeout)</td></tr>
186<tr class="separator:a74f5b08f78dd97aea132bcdfe2cb191c inherit pub_methods_classflair_1_1core_1_1_connected_socket"><td class="memSeparator" colspan="2">&#160;</td></tr>
187<tr class="inherit_header pub_methods_classflair_1_1core_1_1_object"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classflair_1_1core_1_1_object')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classflair_1_1core_1_1_object.html">flair::core::Object</a></td></tr>
188<tr class="memitem:aec92383fd5bf68d9df10414862b7e95c inherit pub_methods_classflair_1_1core_1_1_object"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflair_1_1core_1_1_object.html#aec92383fd5bf68d9df10414862b7e95c">Object</a> (const <a class="el" href="classflair_1_1core_1_1_object.html">Object</a> *parent=NULL, std::string name=&quot;&quot;, std::string type=&quot;&quot;)</td></tr>
189<tr class="memdesc:aec92383fd5bf68d9df10414862b7e95c inherit pub_methods_classflair_1_1core_1_1_object"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <a href="#aec92383fd5bf68d9df10414862b7e95c">More...</a><br /></td></tr>
190<tr class="separator:aec92383fd5bf68d9df10414862b7e95c inherit pub_methods_classflair_1_1core_1_1_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
191<tr class="memitem:aa2bde0e6677bbef705c96c93cb06ad09 inherit pub_methods_classflair_1_1core_1_1_object"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflair_1_1core_1_1_object.html#aa2bde0e6677bbef705c96c93cb06ad09">~Object</a> ()</td></tr>
192<tr class="memdesc:aa2bde0e6677bbef705c96c93cb06ad09 inherit pub_methods_classflair_1_1core_1_1_object"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <a href="#aa2bde0e6677bbef705c96c93cb06ad09">More...</a><br /></td></tr>
193<tr class="separator:aa2bde0e6677bbef705c96c93cb06ad09 inherit pub_methods_classflair_1_1core_1_1_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
194<tr class="memitem:a9b0344dff7e1c05424d9152c8274523a inherit pub_methods_classflair_1_1core_1_1_object"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflair_1_1core_1_1_object.html#a9b0344dff7e1c05424d9152c8274523a">ObjectName</a> (void) const </td></tr>
195<tr class="memdesc:a9b0344dff7e1c05424d9152c8274523a inherit pub_methods_classflair_1_1core_1_1_object"><td class="mdescLeft">&#160;</td><td class="mdescRight">Name.  <a href="#a9b0344dff7e1c05424d9152c8274523a">More...</a><br /></td></tr>
196<tr class="separator:a9b0344dff7e1c05424d9152c8274523a inherit pub_methods_classflair_1_1core_1_1_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
197<tr class="memitem:a609a250ec037fbcaf8957c8f1dcbfc53 inherit pub_methods_classflair_1_1core_1_1_object"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflair_1_1core_1_1_object.html#a609a250ec037fbcaf8957c8f1dcbfc53">ObjectType</a> (void) const </td></tr>
198<tr class="memdesc:a609a250ec037fbcaf8957c8f1dcbfc53 inherit pub_methods_classflair_1_1core_1_1_object"><td class="mdescLeft">&#160;</td><td class="mdescRight">Type.  <a href="#a609a250ec037fbcaf8957c8f1dcbfc53">More...</a><br /></td></tr>
199<tr class="separator:a609a250ec037fbcaf8957c8f1dcbfc53 inherit pub_methods_classflair_1_1core_1_1_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
200<tr class="memitem:a360c112cc3017a5152ebf6e84d2efa70 inherit pub_methods_classflair_1_1core_1_1_object"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classflair_1_1core_1_1_object.html">Object</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflair_1_1core_1_1_object.html#a360c112cc3017a5152ebf6e84d2efa70">Parent</a> (void) const </td></tr>
201<tr class="memdesc:a360c112cc3017a5152ebf6e84d2efa70 inherit pub_methods_classflair_1_1core_1_1_object"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parent.  <a href="#a360c112cc3017a5152ebf6e84d2efa70">More...</a><br /></td></tr>
202<tr class="separator:a360c112cc3017a5152ebf6e84d2efa70 inherit pub_methods_classflair_1_1core_1_1_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
203<tr class="memitem:ae22db4d723ec2d50b3ba48f26a6a770c inherit pub_methods_classflair_1_1core_1_1_object"><td class="memItemLeft" align="right" valign="top">std::vector&lt; const <a class="el" href="classflair_1_1core_1_1_object.html">Object</a> * &gt; *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflair_1_1core_1_1_object.html#ae22db4d723ec2d50b3ba48f26a6a770c">TypeChilds</a> (void) const </td></tr>
204<tr class="memdesc:ae22db4d723ec2d50b3ba48f26a6a770c inherit pub_methods_classflair_1_1core_1_1_object"><td class="mdescLeft">&#160;</td><td class="mdescRight">Childs of the same type.  <a href="#ae22db4d723ec2d50b3ba48f26a6a770c">More...</a><br /></td></tr>
205<tr class="separator:ae22db4d723ec2d50b3ba48f26a6a770c inherit pub_methods_classflair_1_1core_1_1_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
206<tr class="memitem:a344f81cd35805a9501098bf727ac1a10 inherit pub_methods_classflair_1_1core_1_1_object"><td class="memItemLeft" align="right" valign="top">std::vector&lt; const <a class="el" href="classflair_1_1core_1_1_object.html">Object</a> * &gt; *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflair_1_1core_1_1_object.html#a344f81cd35805a9501098bf727ac1a10">Childs</a> (void) const </td></tr>
207<tr class="memdesc:a344f81cd35805a9501098bf727ac1a10 inherit pub_methods_classflair_1_1core_1_1_object"><td class="mdescLeft">&#160;</td><td class="mdescRight">Childs.  <a href="#a344f81cd35805a9501098bf727ac1a10">More...</a><br /></td></tr>
208<tr class="separator:a344f81cd35805a9501098bf727ac1a10 inherit pub_methods_classflair_1_1core_1_1_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
209<tr class="memitem:af001feba14fc053aa778e61080a0b4cf inherit pub_methods_classflair_1_1core_1_1_object"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflair_1_1core_1_1_object.html#af001feba14fc053aa778e61080a0b4cf">Information</a> (const char *function, int line, const char *format,...) const </td></tr>
210<tr class="memdesc:af001feba14fc053aa778e61080a0b4cf inherit pub_methods_classflair_1_1core_1_1_object"><td class="mdescLeft">&#160;</td><td class="mdescRight">Formatted information.  <a href="#af001feba14fc053aa778e61080a0b4cf">More...</a><br /></td></tr>
211<tr class="separator:af001feba14fc053aa778e61080a0b4cf inherit pub_methods_classflair_1_1core_1_1_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
212<tr class="memitem:a168b18451b2ee6126e1e81d452005ff6 inherit pub_methods_classflair_1_1core_1_1_object"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflair_1_1core_1_1_object.html#a168b18451b2ee6126e1e81d452005ff6">Warning</a> (const char *function, const char *format,...) const </td></tr>
213<tr class="memdesc:a168b18451b2ee6126e1e81d452005ff6 inherit pub_methods_classflair_1_1core_1_1_object"><td class="mdescLeft">&#160;</td><td class="mdescRight">Formatted warning.  <a href="#a168b18451b2ee6126e1e81d452005ff6">More...</a><br /></td></tr>
214<tr class="separator:a168b18451b2ee6126e1e81d452005ff6 inherit pub_methods_classflair_1_1core_1_1_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
215<tr class="memitem:a3ca9694d29ec2b0491739879685df5ca inherit pub_methods_classflair_1_1core_1_1_object"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflair_1_1core_1_1_object.html#a3ca9694d29ec2b0491739879685df5ca">Error</a> (const char *function, const char *format,...) const </td></tr>
216<tr class="memdesc:a3ca9694d29ec2b0491739879685df5ca inherit pub_methods_classflair_1_1core_1_1_object"><td class="mdescLeft">&#160;</td><td class="mdescRight">Formatted error.  <a href="#a3ca9694d29ec2b0491739879685df5ca">More...</a><br /></td></tr>
217<tr class="separator:a3ca9694d29ec2b0491739879685df5ca inherit pub_methods_classflair_1_1core_1_1_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
218<tr class="memitem:a36cdd7f556e78b1bddd1d1fe4264bb85 inherit pub_methods_classflair_1_1core_1_1_object"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflair_1_1core_1_1_object.html#a36cdd7f556e78b1bddd1d1fe4264bb85">ErrorOccured</a> (bool recursive=true) const </td></tr>
219<tr class="memdesc:a36cdd7f556e78b1bddd1d1fe4264bb85 inherit pub_methods_classflair_1_1core_1_1_object"><td class="mdescLeft">&#160;</td><td class="mdescRight">Has an errror occured?  <a href="#a36cdd7f556e78b1bddd1d1fe4264bb85">More...</a><br /></td></tr>
220<tr class="separator:a36cdd7f556e78b1bddd1d1fe4264bb85 inherit pub_methods_classflair_1_1core_1_1_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
221</table><table class="memberdecls">
222<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
223Additional Inherited Members</h2></td></tr>
224<tr class="inherit_header pub_types_classflair_1_1core_1_1_object"><td colspan="2" onclick="javascript:toggleInherit('pub_types_classflair_1_1core_1_1_object')"><img src="closed.png" alt="-"/>&#160;Public Types inherited from <a class="el" href="classflair_1_1core_1_1_object.html">flair::core::Object</a></td></tr>
225<tr class="memitem:aed5fccda511f97487040fed29f4efc97 inherit pub_types_classflair_1_1core_1_1_object"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aed5fccda511f97487040fed29f4efc97"></a>enum &#160;</td><td class="memItemRight" valign="bottom"><b>color_t</b> { <b>Auto</b> = 0,
226<b>Red</b> = 31,
227<b>Green</b> = 32,
228<b>Orange</b> = 33
229 }</td></tr>
230<tr class="separator:aed5fccda511f97487040fed29f4efc97 inherit pub_types_classflair_1_1core_1_1_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
231</table>
232<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
233<div class="textblock"><p>Class encapsulating a TCP socket. </p>
234</div><h2 class="groupheader">Member Function Documentation</h2>
235<a class="anchor" id="a7eaffe48d70e5119182bdb5846c6889d"></a>
236<div class="memitem">
237<div class="memproto">
238<table class="mlabels">
239  <tr>
240  <td class="mlabels-left">
241      <table class="memname">
242        <tr>
243          <td class="memname">void flair::core::TcpSocket::Listen </td>
244          <td>(</td>
245          <td class="paramtype">const unsigned int&#160;</td>
246          <td class="paramname"><em>port</em>, </td>
247        </tr>
248        <tr>
249          <td class="paramkey"></td>
250          <td></td>
251          <td class="paramtype">const std::string&#160;</td>
252          <td class="paramname"><em>localAddress</em> = <code>&quot;ANY&quot;</code>&#160;</td>
253        </tr>
254        <tr>
255          <td></td>
256          <td>)</td>
257          <td></td><td></td>
258        </tr>
259      </table>
260  </td>
261  <td class="mlabels-right">
262<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
263  </tr>
264</table>
265</div><div class="memdoc">
266
267<p>Returns a socket which listens on a specific port/address. </p>
268<dl class="params"><dt>Parameters</dt><dd>
269  <table class="params">
270    <tr><td class="paramname">const</td><td>Object* parentObject </td></tr>
271    <tr><td class="paramname">const</td><td>string name </td></tr>
272    <tr><td class="paramname">unsigned</td><td>int port </td></tr>
273    <tr><td class="paramname">const</td><td>localAddress (defaults to any) </td></tr>
274  </table>
275  </dd>
276</dl>
277
278<p>Implements <a class="el" href="classflair_1_1core_1_1_connected_socket.html#ab522b80d805132cd0762f44852085613">flair::core::ConnectedSocket</a>.</p>
279
280</div>
281</div>
282<a class="anchor" id="a55d90b894a14900d2a84a7772124727d"></a>
283<div class="memitem">
284<div class="memproto">
285<table class="mlabels">
286  <tr>
287  <td class="mlabels-left">
288      <table class="memname">
289        <tr>
290          <td class="memname"><a class="el" href="classflair_1_1core_1_1_tcp_socket.html">TcpSocket</a>* flair::core::TcpSocket::Accept </td>
291          <td>(</td>
292          <td class="paramtype"><a class="el" href="namespaceflair_1_1core.html#acc0fa041e08ecf73b2d1d723c339a736">Time</a>&#160;</td>
293          <td class="paramname"><em>timeout</em> = <code>0</code></td><td>)</td>
294          <td></td>
295        </tr>
296      </table>
297  </td>
298  <td class="mlabels-right">
299<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
300  </tr>
301</table>
302</div><div class="memdoc">
303
304<p>Returns a socket on a new incoming connexion. </p>
305<dl class="params"><dt>Parameters</dt><dd>
306  <table class="params">
307    <tr><td class="paramname"><a class="el" href="classflair_1_1core_1_1_connected_socket.html" title="Interface class encapsulating a connected socket. Preserves packets order and guaranty delivery...">ConnectedSocket</a></td><td>&amp;listeningSocket </td></tr>
308  </table>
309  </dd>
310</dl>
311
312<p>Implements <a class="el" href="classflair_1_1core_1_1_connected_socket.html#a8c89979efaba9298d32c58a07021f2e0">flair::core::ConnectedSocket</a>.</p>
313
314</div>
315</div>
316<a class="anchor" id="ac87b68e327a73dada17b3d93dab7929c"></a>
317<div class="memitem">
318<div class="memproto">
319<table class="mlabels">
320  <tr>
321  <td class="mlabels-left">
322      <table class="memname">
323        <tr>
324          <td class="memname">bool flair::core::TcpSocket::Connect </td>
325          <td>(</td>
326          <td class="paramtype">const unsigned int&#160;</td>
327          <td class="paramname"><em>port</em>, </td>
328        </tr>
329        <tr>
330          <td class="paramkey"></td>
331          <td></td>
332          <td class="paramtype">const std::string&#160;</td>
333          <td class="paramname"><em>distantAddress</em>, </td>
334        </tr>
335        <tr>
336          <td class="paramkey"></td>
337          <td></td>
338          <td class="paramtype"><a class="el" href="namespaceflair_1_1core.html#acc0fa041e08ecf73b2d1d723c339a736">Time</a>&#160;</td>
339          <td class="paramname"><em>timeout</em> = <code>0</code>&#160;</td>
340        </tr>
341        <tr>
342          <td></td>
343          <td>)</td>
344          <td></td><td></td>
345        </tr>
346      </table>
347  </td>
348  <td class="mlabels-right">
349<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
350  </tr>
351</table>
352</div><div class="memdoc">
353
354<p>Returns a socket connected to a distant host. </p>
355<dl class="params"><dt>Parameters</dt><dd>
356  <table class="params">
357    <tr><td class="paramname">const</td><td>Object* parentObject </td></tr>
358    <tr><td class="paramname">const</td><td>string name </td></tr>
359    <tr><td class="paramname">unsigned</td><td>int port </td></tr>
360    <tr><td class="paramname">const</td><td>distantAddress </td></tr>
361    <tr><td class="paramname">timeout</td><td>timeout (in milliseconds) </td></tr>
362  </table>
363  </dd>
364</dl>
365
366<p>Implements <a class="el" href="classflair_1_1core_1_1_connected_socket.html#aebfdaebe07aee9b77b75d56e61fd6926">flair::core::ConnectedSocket</a>.</p>
367
368</div>
369</div>
370<a class="anchor" id="aaca9be5ab271cef04af09219ff262f38"></a>
371<div class="memitem">
372<div class="memproto">
373<table class="mlabels">
374  <tr>
375  <td class="mlabels-left">
376      <table class="memname">
377        <tr>
378          <td class="memname">ssize_t flair::core::TcpSocket::SendMessage </td>
379          <td>(</td>
380          <td class="paramtype">const char *&#160;</td>
381          <td class="paramname"><em>message</em>, </td>
382        </tr>
383        <tr>
384          <td class="paramkey"></td>
385          <td></td>
386          <td class="paramtype">size_t&#160;</td>
387          <td class="paramname"><em>message_len</em>, </td>
388        </tr>
389        <tr>
390          <td class="paramkey"></td>
391          <td></td>
392          <td class="paramtype"><a class="el" href="namespaceflair_1_1core.html#acc0fa041e08ecf73b2d1d723c339a736">Time</a>&#160;</td>
393          <td class="paramname"><em>timeout</em> = <code>0</code>&#160;</td>
394        </tr>
395        <tr>
396          <td></td>
397          <td>)</td>
398          <td></td><td></td>
399        </tr>
400      </table>
401  </td>
402  <td class="mlabels-right">
403<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
404  </tr>
405</table>
406</div><div class="memdoc">
407
408<p>Send a message. </p>
409<dl class="params"><dt>Parameters</dt><dd>
410  <table class="params">
411    <tr><td class="paramname">message</td><td>message </td></tr>
412    <tr><td class="paramname">message_len</td><td>message length </td></tr>
413    <tr><td class="paramname">timeout</td><td>timeout (in milliseconds) </td></tr>
414  </table>
415  </dd>
416</dl>
417
418<p>Implements <a class="el" href="classflair_1_1core_1_1_connected_socket.html#aed7d5a9e49996bf672050f95f82d85b4">flair::core::ConnectedSocket</a>.</p>
419
420</div>
421</div>
422<a class="anchor" id="ad7e7cf859d7cbe230a33f90c8c1bcfc2"></a>
423<div class="memitem">
424<div class="memproto">
425<table class="mlabels">
426  <tr>
427  <td class="mlabels-left">
428      <table class="memname">
429        <tr>
430          <td class="memname">ssize_t flair::core::TcpSocket::RecvMessage </td>
431          <td>(</td>
432          <td class="paramtype">char *&#160;</td>
433          <td class="paramname"><em>buf</em>, </td>
434        </tr>
435        <tr>
436          <td class="paramkey"></td>
437          <td></td>
438          <td class="paramtype">size_t&#160;</td>
439          <td class="paramname"><em>buf_len</em>, </td>
440        </tr>
441        <tr>
442          <td class="paramkey"></td>
443          <td></td>
444          <td class="paramtype"><a class="el" href="namespaceflair_1_1core.html#acc0fa041e08ecf73b2d1d723c339a736">Time</a>&#160;</td>
445          <td class="paramname"><em>timeout</em> = <code>0</code>&#160;</td>
446        </tr>
447        <tr>
448          <td></td>
449          <td>)</td>
450          <td></td><td></td>
451        </tr>
452      </table>
453  </td>
454  <td class="mlabels-right">
455<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
456  </tr>
457</table>
458</div><div class="memdoc">
459
460<p>Receive a message. </p>
461<p>Receive a message and wait up to timeout. <br />
462 </p><dl class="params"><dt>Parameters</dt><dd>
463  <table class="params">
464    <tr><td class="paramname">buf</td><td>buffer to put the message </td></tr>
465    <tr><td class="paramname">buf_len</td><td>buffer length </td></tr>
466    <tr><td class="paramname">timeout</td><td>timeout (in milliseconds)</td></tr>
467  </table>
468  </dd>
469</dl>
470<dl class="section return"><dt>Returns</dt><dd>size of the received message </dd></dl>
471
472<p>Implements <a class="el" href="classflair_1_1core_1_1_connected_socket.html#ade302ba4b2afddd6b421823a261f01c9">flair::core::ConnectedSocket</a>.</p>
473
474</div>
475</div>
476<a class="anchor" id="a94921895eb0b474e967d611d78d630e2"></a>
477<div class="memitem">
478<div class="memproto">
479<table class="mlabels">
480  <tr>
481  <td class="mlabels-left">
482      <table class="memname">
483        <tr>
484          <td class="memname">uint16_t flair::core::TcpSocket::NetworkToHost16 </td>
485          <td>(</td>
486          <td class="paramtype">uint16_t&#160;</td>
487          <td class="paramname"><em>data</em></td><td>)</td>
488          <td></td>
489        </tr>
490      </table>
491  </td>
492  <td class="mlabels-right">
493<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
494  </tr>
495</table>
496</div><div class="memdoc">
497
498<p>! See <a class="el" href="_socket_8h.html" title="Class defining a UDP socket. ">Socket.h</a> for a more generic implementation of network/host endianness </p>
499
500<p>Implements <a class="el" href="classflair_1_1core_1_1_connected_socket.html#a01410482ffeca813adcd5240cc69292d">flair::core::ConnectedSocket</a>.</p>
501
502</div>
503</div>
504</div><!-- contents -->
505</div><!-- doc-content -->
506<!-- start footer part -->
507<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
508  <ul>
509    <li class="navelem"><a class="el" href="namespaceflair.html">flair</a></li><li class="navelem"><a class="el" href="namespaceflair_1_1core.html">core</a></li><li class="navelem"><a class="el" href="classflair_1_1core_1_1_tcp_socket.html">TcpSocket</a></li>
510    <li class="footer">Generated on Wed Apr 20 2016 16:16:00 for Flair by
511    <a href="http://www.doxygen.org/index.html">
512    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.7 </li>
513  </ul>
514</div>
515</body>
516</html>
Note: See TracBrowser for help on using the repository browser.