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

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

m

File size: 30.0 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::Socket 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_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_socket-members.html">List of all members</a>  </div>
111  <div class="headertitle">
112<div class="title">flair::core::Socket Class Reference</div>  </div>
113</div><!--header-->
114<div class="contents">
115
116<p>Class encapsulating a UDP socket. It assumes packets are coming from only one distant host on a given port. 
117 <a href="classflair_1_1core_1_1_socket.html#details">More...</a></p>
118
119<p><code>#include &lt;<a class="el" href="_socket_8h_source.html">Socket.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::Socket:</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_socket.png" usemap="#flair::core::Socket_map" alt=""/>
127  <map id="flair::core::Socket_map" name="flair::core::Socket_map">
128<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,110,24"/>
129</map>
130 </div></div>
131<table class="memberdecls">
132<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
133Public Member Functions</h2></td></tr>
134<tr class="memitem:aca27bc21b18df08ae8282181f6492313"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflair_1_1core_1_1_socket.html#aca27bc21b18df08ae8282181f6492313">Socket</a> (const <a class="el" href="classflair_1_1core_1_1_object.html">Object</a> *parent, std::string name, std::string address, bool broadcast=false)</td></tr>
135<tr class="memdesc:aca27bc21b18df08ae8282181f6492313"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <a href="#aca27bc21b18df08ae8282181f6492313">More...</a><br /></td></tr>
136<tr class="separator:aca27bc21b18df08ae8282181f6492313"><td class="memSeparator" colspan="2">&#160;</td></tr>
137<tr class="memitem:af06b25a783310b900c52bafeb99d7813"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflair_1_1core_1_1_socket.html#af06b25a783310b900c52bafeb99d7813">Socket</a> (const <a class="el" href="classflair_1_1core_1_1_object.html">Object</a> *parent, std::string name, uint16_t port)</td></tr>
138<tr class="memdesc:af06b25a783310b900c52bafeb99d7813"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <a href="#af06b25a783310b900c52bafeb99d7813">More...</a><br /></td></tr>
139<tr class="separator:af06b25a783310b900c52bafeb99d7813"><td class="memSeparator" colspan="2">&#160;</td></tr>
140<tr class="memitem:a70410169166f46e51a9eea61af51286a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflair_1_1core_1_1_socket.html#a70410169166f46e51a9eea61af51286a">~Socket</a> ()</td></tr>
141<tr class="memdesc:a70410169166f46e51a9eea61af51286a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <a href="#a70410169166f46e51a9eea61af51286a">More...</a><br /></td></tr>
142<tr class="separator:a70410169166f46e51a9eea61af51286a"><td class="memSeparator" colspan="2">&#160;</td></tr>
143<tr class="memitem:a5675766254a1fca34d42b406cbe324fd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflair_1_1core_1_1_socket.html#a5675766254a1fca34d42b406cbe324fd">SendMessage</a> (std::string message)</td></tr>
144<tr class="memdesc:a5675766254a1fca34d42b406cbe324fd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send a message.  <a href="#a5675766254a1fca34d42b406cbe324fd">More...</a><br /></td></tr>
145<tr class="separator:a5675766254a1fca34d42b406cbe324fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
146<tr class="memitem:a007eb44554d491551fd26d975d181a41"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflair_1_1core_1_1_socket.html#a007eb44554d491551fd26d975d181a41">SendMessage</a> (const char *message, size_t message_len)</td></tr>
147<tr class="memdesc:a007eb44554d491551fd26d975d181a41"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send a message.  <a href="#a007eb44554d491551fd26d975d181a41">More...</a><br /></td></tr>
148<tr class="separator:a007eb44554d491551fd26d975d181a41"><td class="memSeparator" colspan="2">&#160;</td></tr>
149<tr class="memitem:a6b83e7fdf7a828a7a02ba2f867c4d973"><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_socket.html#a6b83e7fdf7a828a7a02ba2f867c4d973">RecvMessage</a> (char *buf, size_t buf_len, <a class="el" href="namespaceflair_1_1core.html#acc0fa041e08ecf73b2d1d723c339a736">Time</a> timeout, char *src=NULL, size_t *src_len=NULL)</td></tr>
150<tr class="memdesc:a6b83e7fdf7a828a7a02ba2f867c4d973"><td class="mdescLeft">&#160;</td><td class="mdescRight">Receive a message.  <a href="#a6b83e7fdf7a828a7a02ba2f867c4d973">More...</a><br /></td></tr>
151<tr class="separator:a6b83e7fdf7a828a7a02ba2f867c4d973"><td class="memSeparator" colspan="2">&#160;</td></tr>
152<tr class="memitem:a60b8f46da65f1401012db4cb449992eb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a60b8f46da65f1401012db4cb449992eb"></a>
153void&#160;</td><td class="memItemRight" valign="bottom"><b>NetworkToHost</b> (char *data, size_t dataSize)</td></tr>
154<tr class="separator:a60b8f46da65f1401012db4cb449992eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
155<tr class="memitem:a955291105192f6599ab6251c6959ad5f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a955291105192f6599ab6251c6959ad5f"></a>
156void&#160;</td><td class="memItemRight" valign="bottom"><b>HostToNetwork</b> (char *data, size_t dataSize)</td></tr>
157<tr class="separator:a955291105192f6599ab6251c6959ad5f"><td class="memSeparator" colspan="2">&#160;</td></tr>
158<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>
159<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>
160<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>
161<tr class="separator:aec92383fd5bf68d9df10414862b7e95c inherit pub_methods_classflair_1_1core_1_1_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
162<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>
163<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>
164<tr class="separator:aa2bde0e6677bbef705c96c93cb06ad09 inherit pub_methods_classflair_1_1core_1_1_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
165<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>
166<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>
167<tr class="separator:a9b0344dff7e1c05424d9152c8274523a inherit pub_methods_classflair_1_1core_1_1_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
168<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>
169<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>
170<tr class="separator:a609a250ec037fbcaf8957c8f1dcbfc53 inherit pub_methods_classflair_1_1core_1_1_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
171<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>
172<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>
173<tr class="separator:a360c112cc3017a5152ebf6e84d2efa70 inherit pub_methods_classflair_1_1core_1_1_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
174<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>
175<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>
176<tr class="separator:ae22db4d723ec2d50b3ba48f26a6a770c inherit pub_methods_classflair_1_1core_1_1_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
177<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>
178<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>
179<tr class="separator:a344f81cd35805a9501098bf727ac1a10 inherit pub_methods_classflair_1_1core_1_1_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
180<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>
181<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>
182<tr class="separator:af001feba14fc053aa778e61080a0b4cf inherit pub_methods_classflair_1_1core_1_1_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
183<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>
184<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>
185<tr class="separator:a168b18451b2ee6126e1e81d452005ff6 inherit pub_methods_classflair_1_1core_1_1_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
186<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>
187<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>
188<tr class="separator:a3ca9694d29ec2b0491739879685df5ca inherit pub_methods_classflair_1_1core_1_1_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
189<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>
190<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>
191<tr class="separator:a36cdd7f556e78b1bddd1d1fe4264bb85 inherit pub_methods_classflair_1_1core_1_1_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
192</table><table class="memberdecls">
193<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
194Additional Inherited Members</h2></td></tr>
195<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>
196<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,
197<b>Red</b> = 31,
198<b>Green</b> = 32,
199<b>Orange</b> = 33
200 }</td></tr>
201<tr class="separator:aed5fccda511f97487040fed29f4efc97 inherit pub_types_classflair_1_1core_1_1_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
202</table>
203<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
204<div class="textblock"><p>Class encapsulating a UDP socket. It assumes packets are coming from only one distant host on a given port. </p>
205</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
206<a class="anchor" id="aca27bc21b18df08ae8282181f6492313"></a>
207<div class="memitem">
208<div class="memproto">
209      <table class="memname">
210        <tr>
211          <td class="memname">flair::core::Socket::Socket </td>
212          <td>(</td>
213          <td class="paramtype">const <a class="el" href="classflair_1_1core_1_1_object.html">Object</a> *&#160;</td>
214          <td class="paramname"><em>parent</em>, </td>
215        </tr>
216        <tr>
217          <td class="paramkey"></td>
218          <td></td>
219          <td class="paramtype">std::string&#160;</td>
220          <td class="paramname"><em>name</em>, </td>
221        </tr>
222        <tr>
223          <td class="paramkey"></td>
224          <td></td>
225          <td class="paramtype">std::string&#160;</td>
226          <td class="paramname"><em>address</em>, </td>
227        </tr>
228        <tr>
229          <td class="paramkey"></td>
230          <td></td>
231          <td class="paramtype">bool&#160;</td>
232          <td class="paramname"><em>broadcast</em> = <code>false</code>&#160;</td>
233        </tr>
234        <tr>
235          <td></td>
236          <td>)</td>
237          <td></td><td></td>
238        </tr>
239      </table>
240</div><div class="memdoc">
241
242<p>Constructor. </p>
243<p>Construct the client side of the socket</p>
244<dl class="params"><dt>Parameters</dt><dd>
245  <table class="params">
246    <tr><td class="paramname">parent</td><td>parent </td></tr>
247    <tr><td class="paramname">name</td><td>name </td></tr>
248    <tr><td class="paramname">address</td><td>server address (ex 192.168.1.1:9000) </td></tr>
249    <tr><td class="paramname">broadcast</td><td>true if address is a broadcast address </td></tr>
250  </table>
251  </dd>
252</dl>
253
254</div>
255</div>
256<a class="anchor" id="af06b25a783310b900c52bafeb99d7813"></a>
257<div class="memitem">
258<div class="memproto">
259      <table class="memname">
260        <tr>
261          <td class="memname">flair::core::Socket::Socket </td>
262          <td>(</td>
263          <td class="paramtype">const <a class="el" href="classflair_1_1core_1_1_object.html">Object</a> *&#160;</td>
264          <td class="paramname"><em>parent</em>, </td>
265        </tr>
266        <tr>
267          <td class="paramkey"></td>
268          <td></td>
269          <td class="paramtype">std::string&#160;</td>
270          <td class="paramname"><em>name</em>, </td>
271        </tr>
272        <tr>
273          <td class="paramkey"></td>
274          <td></td>
275          <td class="paramtype">uint16_t&#160;</td>
276          <td class="paramname"><em>port</em>&#160;</td>
277        </tr>
278        <tr>
279          <td></td>
280          <td>)</td>
281          <td></td><td></td>
282        </tr>
283      </table>
284</div><div class="memdoc">
285
286<p>Constructor. </p>
287<p>Construct the server side of the socket</p>
288<dl class="params"><dt>Parameters</dt><dd>
289  <table class="params">
290    <tr><td class="paramname">parent</td><td>parent </td></tr>
291    <tr><td class="paramname">name</td><td>name </td></tr>
292    <tr><td class="paramname">port</td><td>listening port </td></tr>
293  </table>
294  </dd>
295</dl>
296
297</div>
298</div>
299<a class="anchor" id="a70410169166f46e51a9eea61af51286a"></a>
300<div class="memitem">
301<div class="memproto">
302      <table class="memname">
303        <tr>
304          <td class="memname">flair::core::Socket::~Socket </td>
305          <td>(</td>
306          <td class="paramname"></td><td>)</td>
307          <td></td>
308        </tr>
309      </table>
310</div><div class="memdoc">
311
312<p>Destructor. </p>
313
314</div>
315</div>
316<h2 class="groupheader">Member Function Documentation</h2>
317<a class="anchor" id="a5675766254a1fca34d42b406cbe324fd"></a>
318<div class="memitem">
319<div class="memproto">
320      <table class="memname">
321        <tr>
322          <td class="memname">void flair::core::Socket::SendMessage </td>
323          <td>(</td>
324          <td class="paramtype">std::string&#160;</td>
325          <td class="paramname"><em>message</em></td><td>)</td>
326          <td></td>
327        </tr>
328      </table>
329</div><div class="memdoc">
330
331<p>Send a message. </p>
332<p>In case of a broadcast <a class="el" href="classflair_1_1core_1_1_socket.html" title="Class encapsulating a UDP socket. It assumes packets are coming from only one distant host on a given...">Socket</a>, <a class="el" href="classflair_1_1core_1_1_object.html#a360c112cc3017a5152ebf6e84d2efa70" title="Parent. ">Parent()</a>-&gt;<a class="el" href="classflair_1_1core_1_1_object.html#a9b0344dff7e1c05424d9152c8274523a" title="Name. ">ObjectName()</a> is used as source of the message, this name should be unique.</p>
333<dl class="params"><dt>Parameters</dt><dd>
334  <table class="params">
335    <tr><td class="paramname">message</td><td>message </td></tr>
336  </table>
337  </dd>
338</dl>
339
340</div>
341</div>
342<a class="anchor" id="a007eb44554d491551fd26d975d181a41"></a>
343<div class="memitem">
344<div class="memproto">
345      <table class="memname">
346        <tr>
347          <td class="memname">void flair::core::Socket::SendMessage </td>
348          <td>(</td>
349          <td class="paramtype">const char *&#160;</td>
350          <td class="paramname"><em>message</em>, </td>
351        </tr>
352        <tr>
353          <td class="paramkey"></td>
354          <td></td>
355          <td class="paramtype">size_t&#160;</td>
356          <td class="paramname"><em>message_len</em>&#160;</td>
357        </tr>
358        <tr>
359          <td></td>
360          <td>)</td>
361          <td></td><td></td>
362        </tr>
363      </table>
364</div><div class="memdoc">
365
366<p>Send a message. </p>
367<dl class="params"><dt>Parameters</dt><dd>
368  <table class="params">
369    <tr><td class="paramname">message</td><td>message </td></tr>
370    <tr><td class="paramname">message_len</td><td>message length </td></tr>
371  </table>
372  </dd>
373</dl>
374
375</div>
376</div>
377<a class="anchor" id="a6b83e7fdf7a828a7a02ba2f867c4d973"></a>
378<div class="memitem">
379<div class="memproto">
380      <table class="memname">
381        <tr>
382          <td class="memname">ssize_t flair::core::Socket::RecvMessage </td>
383          <td>(</td>
384          <td class="paramtype">char *&#160;</td>
385          <td class="paramname"><em>buf</em>, </td>
386        </tr>
387        <tr>
388          <td class="paramkey"></td>
389          <td></td>
390          <td class="paramtype">size_t&#160;</td>
391          <td class="paramname"><em>buf_len</em>, </td>
392        </tr>
393        <tr>
394          <td class="paramkey"></td>
395          <td></td>
396          <td class="paramtype"><a class="el" href="namespaceflair_1_1core.html#acc0fa041e08ecf73b2d1d723c339a736">Time</a>&#160;</td>
397          <td class="paramname"><em>timeout</em>, </td>
398        </tr>
399        <tr>
400          <td class="paramkey"></td>
401          <td></td>
402          <td class="paramtype">char *&#160;</td>
403          <td class="paramname"><em>src</em> = <code>NULL</code>, </td>
404        </tr>
405        <tr>
406          <td class="paramkey"></td>
407          <td></td>
408          <td class="paramtype">size_t *&#160;</td>
409          <td class="paramname"><em>src_len</em> = <code>NULL</code>&#160;</td>
410        </tr>
411        <tr>
412          <td></td>
413          <td>)</td>
414          <td></td><td></td>
415        </tr>
416      </table>
417</div><div class="memdoc">
418
419<p>Receive a message. </p>
420<p>Receive a message and wait up to timeout. <br />
421If src and src_len are specified, the source of the message will be copied in the src buffer. <br />
422Note that in case of a broadcast socket, own messages are filtered and are not received.</p>
423<dl class="params"><dt>Parameters</dt><dd>
424  <table class="params">
425    <tr><td class="paramname">buf</td><td>buffer to put the message </td></tr>
426    <tr><td class="paramname">buf_len</td><td>buffer length </td></tr>
427    <tr><td class="paramname">timeout</td><td>timeout </td></tr>
428    <tr><td class="paramname">src</td><td>buffer to put source name </td></tr>
429    <tr><td class="paramname">src_len</td><td>buffer length</td></tr>
430  </table>
431  </dd>
432</dl>
433<dl class="section return"><dt>Returns</dt><dd>size of the received message </dd></dl>
434
435</div>
436</div>
437</div><!-- contents -->
438</div><!-- doc-content -->
439<!-- start footer part -->
440<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
441  <ul>
442    <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_socket.html">Socket</a></li>
443    <li class="footer">Generated on Wed Apr 20 2016 16:16:00 for Flair by
444    <a href="http://www.doxygen.org/index.html">
445    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.7 </li>
446  </ul>
447</div>
448</body>
449</html>
Note: See TracBrowser for help on using the repository browser.