Ryan OShea | de36e4a | 2020-03-13 16:26:19 +0000 | [diff] [blame] | 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.13"/> |
| 7 | <meta name="viewport" content="width=device-width, initial-scale=1"/> |
| 8 | <title>ArmNN: armnnUtils::Sockets Namespace Reference</title> |
| 9 | <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| 10 | <script type="text/javascript" src="jquery.js"></script> |
| 11 | <script type="text/javascript" src="dynsections.js"></script> |
| 12 | <link href="navtree.css" rel="stylesheet" type="text/css"/> |
| 13 | <script type="text/javascript" src="resize.js"></script> |
| 14 | <script type="text/javascript" src="navtreedata.js"></script> |
| 15 | <script type="text/javascript" src="navtree.js"></script> |
| 16 | <script type="text/javascript"> |
| 17 | $(document).ready(initResizable); |
| 18 | </script> |
| 19 | <link href="search/search.css" rel="stylesheet" type="text/css"/> |
| 20 | <script type="text/javascript" src="search/searchdata.js"></script> |
| 21 | <script type="text/javascript" src="search/search.js"></script> |
| 22 | <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| 23 | </head> |
| 24 | <body> |
| 25 | <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| 26 | <div id="titlearea"> |
| 27 | <table cellspacing="0" cellpadding="0"> |
| 28 | <tbody> |
| 29 | <tr style="height: 56px;"> |
| 30 | <td id="projectalign" style="padding-left: 0.5em;"> |
| 31 | <div id="projectname">ArmNN |
| 32 |  <span id="projectnumber">NotReleased</span> |
| 33 | </div> |
| 34 | </td> |
| 35 | </tr> |
| 36 | </tbody> |
| 37 | </table> |
| 38 | </div> |
| 39 | <!-- end header part --> |
| 40 | <!-- Generated by Doxygen 1.8.13 --> |
| 41 | <script type="text/javascript"> |
| 42 | var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| 43 | </script> |
| 44 | <script type="text/javascript" src="menudata.js"></script> |
| 45 | <script type="text/javascript" src="menu.js"></script> |
| 46 | <script type="text/javascript"> |
| 47 | $(function() { |
| 48 | initMenu('',true,false,'search.php','Search'); |
| 49 | $(document).ready(function() { init_search(); }); |
| 50 | }); |
| 51 | </script> |
| 52 | <div id="main-nav"></div> |
| 53 | </div><!-- top --> |
| 54 | <div id="side-nav" class="ui-resizable side-nav-resizable"> |
| 55 | <div id="nav-tree"> |
| 56 | <div id="nav-tree-contents"> |
| 57 | <div id="nav-sync" class="sync"></div> |
| 58 | </div> |
| 59 | </div> |
| 60 | <div id="splitbar" style="-moz-user-select:none;" |
| 61 | class="ui-resizable-handle"> |
| 62 | </div> |
| 63 | </div> |
| 64 | <script type="text/javascript"> |
| 65 | $(document).ready(function(){initNavTree('namespacearmnn_utils_1_1_sockets.html','');}); |
| 66 | </script> |
| 67 | <div id="doc-content"> |
| 68 | <!-- window showing the filter options --> |
| 69 | <div id="MSearchSelectWindow" |
| 70 | onmouseover="return searchBox.OnSearchSelectShow()" |
| 71 | onmouseout="return searchBox.OnSearchSelectHide()" |
| 72 | onkeydown="return searchBox.OnSearchSelectKey(event)"> |
| 73 | </div> |
| 74 | |
| 75 | <!-- iframe showing the search results (closed by default) --> |
| 76 | <div id="MSearchResultsWindow"> |
| 77 | <iframe src="javascript:void(0)" frameborder="0" |
| 78 | name="MSearchResults" id="MSearchResults"> |
| 79 | </iframe> |
| 80 | </div> |
| 81 | |
| 82 | <div class="header"> |
| 83 | <div class="summary"> |
| 84 | <a href="#func-members">Functions</a> </div> |
| 85 | <div class="headertitle"> |
| 86 | <div class="title">armnnUtils::Sockets Namespace Reference</div> </div> |
| 87 | </div><!--header--> |
| 88 | <div class="contents"> |
| 89 | <table class="memberdecls"> |
| 90 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> |
| 91 | Functions</h2></td></tr> |
| 92 | <tr class="memitem:a248c764067ee60c03ee370784c49f353"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_utils_1_1_sockets.html#a248c764067ee60c03ee370784c49f353">Initialize</a> ()</td></tr> |
| 93 | <tr class="memdesc:a248c764067ee60c03ee370784c49f353"><td class="mdescLeft"> </td><td class="mdescRight">Performs any required one-time setup. <a href="#a248c764067ee60c03ee370784c49f353">More...</a><br /></td></tr> |
| 94 | <tr class="separator:a248c764067ee60c03ee370784c49f353"><td class="memSeparator" colspan="2"> </td></tr> |
| 95 | <tr class="memitem:a72e0661331d20d0a352fb49c388a1b05"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_utils_1_1_sockets.html#a72e0661331d20d0a352fb49c388a1b05">Close</a> (Socket s)</td></tr> |
| 96 | <tr class="separator:a72e0661331d20d0a352fb49c388a1b05"><td class="memSeparator" colspan="2"> </td></tr> |
| 97 | <tr class="memitem:a8396c0d14fc0e7284b175fedfeceef37"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_utils_1_1_sockets.html#a8396c0d14fc0e7284b175fedfeceef37">SetNonBlocking</a> (Socket s)</td></tr> |
| 98 | <tr class="separator:a8396c0d14fc0e7284b175fedfeceef37"><td class="memSeparator" colspan="2"> </td></tr> |
| 99 | <tr class="memitem:ad5b08981ac047ff0a3c7cb3442b9f161"><td class="memItemLeft" align="right" valign="top">long </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_utils_1_1_sockets.html#ad5b08981ac047ff0a3c7cb3442b9f161">Write</a> (Socket s, const void *buf, size_t len)</td></tr> |
| 100 | <tr class="separator:ad5b08981ac047ff0a3c7cb3442b9f161"><td class="memSeparator" colspan="2"> </td></tr> |
| 101 | <tr class="memitem:a7b2c6949d9d76d2c0ffca916175e5322"><td class="memItemLeft" align="right" valign="top">long </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_utils_1_1_sockets.html#a7b2c6949d9d76d2c0ffca916175e5322">Read</a> (Socket s, void *buf, size_t len)</td></tr> |
| 102 | <tr class="separator:a7b2c6949d9d76d2c0ffca916175e5322"><td class="memSeparator" colspan="2"> </td></tr> |
| 103 | <tr class="memitem:a36eb04939ffbb4d4a1291724921a6c6a"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_utils_1_1_sockets.html#a36eb04939ffbb4d4a1291724921a6c6a">Ioctl</a> (Socket s, unsigned long int cmd, void *arg)</td></tr> |
| 104 | <tr class="separator:a36eb04939ffbb4d4a1291724921a6c6a"><td class="memSeparator" colspan="2"> </td></tr> |
| 105 | <tr class="memitem:a242d840b21fc2f18ac1ec8d609180e15"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_utils_1_1_sockets.html#a242d840b21fc2f18ac1ec8d609180e15">Poll</a> (PollFd *fds, nfds_t numFds, int timeout)</td></tr> |
| 106 | <tr class="separator:a242d840b21fc2f18ac1ec8d609180e15"><td class="memSeparator" colspan="2"> </td></tr> |
| 107 | <tr class="memitem:ae7d45c832d3f9a398a08352442d20417"><td class="memItemLeft" align="right" valign="top">armnnUtils::Sockets::Socket </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_utils_1_1_sockets.html#ae7d45c832d3f9a398a08352442d20417">Accept</a> (Socket s, sockaddr *addr, socklen_t *addrlen, int flags)</td></tr> |
| 108 | <tr class="separator:ae7d45c832d3f9a398a08352442d20417"><td class="memSeparator" colspan="2"> </td></tr> |
| 109 | </table> |
| 110 | <h2 class="groupheader">Function Documentation</h2> |
| 111 | <a id="ae7d45c832d3f9a398a08352442d20417"></a> |
| 112 | <h2 class="memtitle"><span class="permalink"><a href="#ae7d45c832d3f9a398a08352442d20417">◆ </a></span>Accept()</h2> |
| 113 | |
| 114 | <div class="memitem"> |
| 115 | <div class="memproto"> |
| 116 | <table class="memname"> |
| 117 | <tr> |
| 118 | <td class="memname">Socket Accept </td> |
| 119 | <td>(</td> |
| 120 | <td class="paramtype">Socket </td> |
| 121 | <td class="paramname"><em>s</em>, </td> |
| 122 | </tr> |
| 123 | <tr> |
| 124 | <td class="paramkey"></td> |
| 125 | <td></td> |
| 126 | <td class="paramtype">sockaddr * </td> |
| 127 | <td class="paramname"><em>addr</em>, </td> |
| 128 | </tr> |
| 129 | <tr> |
| 130 | <td class="paramkey"></td> |
| 131 | <td></td> |
| 132 | <td class="paramtype">socklen_t * </td> |
| 133 | <td class="paramname"><em>addrlen</em>, </td> |
| 134 | </tr> |
| 135 | <tr> |
| 136 | <td class="paramkey"></td> |
| 137 | <td></td> |
| 138 | <td class="paramtype">int </td> |
| 139 | <td class="paramname"><em>flags</em> </td> |
| 140 | </tr> |
| 141 | <tr> |
| 142 | <td></td> |
| 143 | <td>)</td> |
| 144 | <td></td><td></td> |
| 145 | </tr> |
| 146 | </table> |
| 147 | </div><div class="memdoc"> |
| 148 | |
| 149 | <p class="definition">Definition at line <a class="el" href="_network_sockets_8cpp_source.html#l00091">91</a> of file <a class="el" href="_network_sockets_8cpp_source.html">NetworkSockets.cpp</a>.</p> |
| 150 | |
| 151 | <p class="reference">Referenced by <a class="el" href="_gatord_mock_service_8cpp_source.html#l00058">GatordMockService::BlockForOneClient()</a>.</p> |
| 152 | <div class="fragment"><div class="line"><a name="l00092"></a><span class="lineno"> 92</span> {</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span> <span class="preprocessor">#if defined(__unix__)</span></div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <span class="keywordflow">return</span> accept4(s, addr, addrlen, flags);</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span> <span class="preprocessor">#elif defined(_MSC_VER)</span></div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  <span class="keywordflow">return</span> accept(s, addr, reinterpret_cast<int*>(addrlen));</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span> }</div></div><!-- fragment --> |
| 153 | </div> |
| 154 | </div> |
| 155 | <a id="a72e0661331d20d0a352fb49c388a1b05"></a> |
| 156 | <h2 class="memtitle"><span class="permalink"><a href="#a72e0661331d20d0a352fb49c388a1b05">◆ </a></span>Close()</h2> |
| 157 | |
| 158 | <div class="memitem"> |
| 159 | <div class="memproto"> |
| 160 | <table class="memname"> |
| 161 | <tr> |
| 162 | <td class="memname">int Close </td> |
| 163 | <td>(</td> |
| 164 | <td class="paramtype">Socket </td> |
| 165 | <td class="paramname"><em>s</em></td><td>)</td> |
| 166 | <td></td> |
| 167 | </tr> |
| 168 | </table> |
| 169 | </div><div class="memdoc"> |
| 170 | |
| 171 | <p class="definition">Definition at line <a class="el" href="_network_sockets_8cpp_source.html#l00028">28</a> of file <a class="el" href="_network_sockets_8cpp_source.html">NetworkSockets.cpp</a>.</p> |
| 172 | |
| 173 | <p class="reference">Referenced by <a class="el" href="_socket_profiling_connection_8cpp_source.html#l00058">SocketProfilingConnection::Close()</a>, <a class="el" href="_file_only_profiling_connection_8hpp_source.html#l00040">FileOnlyProfilingConnection::FileOnlyProfilingConnection()</a>, <a class="el" href="_gatord_mock_service_8cpp_source.html#l00149">GatordMockService::LaunchReceivingThread()</a>, and <a class="el" href="_gatord_mock_service_8hpp_source.html#l00050">GatordMockService::~GatordMockService()</a>.</p> |
| 174 | <div class="fragment"><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> {</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="preprocessor">#if defined(__unix__)</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>  <span class="keywordflow">return</span> close(s);</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="preprocessor">#elif defined(_MSC_VER)</span></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  <span class="keywordflow">return</span> closesocket(s);</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> }</div></div><!-- fragment --> |
| 175 | </div> |
| 176 | </div> |
| 177 | <a id="a248c764067ee60c03ee370784c49f353"></a> |
| 178 | <h2 class="memtitle"><span class="permalink"><a href="#a248c764067ee60c03ee370784c49f353">◆ </a></span>Initialize()</h2> |
| 179 | |
| 180 | <div class="memitem"> |
| 181 | <div class="memproto"> |
| 182 | <table class="memname"> |
| 183 | <tr> |
| 184 | <td class="memname">bool Initialize </td> |
| 185 | <td>(</td> |
| 186 | <td class="paramname"></td><td>)</td> |
| 187 | <td></td> |
| 188 | </tr> |
| 189 | </table> |
| 190 | </div><div class="memdoc"> |
| 191 | |
| 192 | <p>Performs any required one-time setup. </p> |
| 193 | |
| 194 | <p class="definition">Definition at line <a class="el" href="_network_sockets_8cpp_source.html#l00018">18</a> of file <a class="el" href="_network_sockets_8cpp_source.html">NetworkSockets.cpp</a>.</p> |
| 195 | |
| 196 | <p class="reference">Referenced by <a class="el" href="_gatord_mock_service_8cpp_source.html#l00027">GatordMockService::OpenListeningSocket()</a>, and <a class="el" href="_socket_profiling_connection_8cpp_source.html#l00019">SocketProfilingConnection::SocketProfilingConnection()</a>.</p> |
| 197 | <div class="fragment"><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> {</div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#if defined(__unix__)</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#elif defined(_MSC_VER)</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>  WSADATA wsaData;</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>  <span class="keywordflow">return</span> WSAStartup(MAKEWORD(2, 2), &wsaData) == 0;</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> }</div></div><!-- fragment --> |
| 198 | </div> |
| 199 | </div> |
| 200 | <a id="a36eb04939ffbb4d4a1291724921a6c6a"></a> |
| 201 | <h2 class="memtitle"><span class="permalink"><a href="#a36eb04939ffbb4d4a1291724921a6c6a">◆ </a></span>Ioctl()</h2> |
| 202 | |
| 203 | <div class="memitem"> |
| 204 | <div class="memproto"> |
| 205 | <table class="memname"> |
| 206 | <tr> |
| 207 | <td class="memname">int Ioctl </td> |
| 208 | <td>(</td> |
| 209 | <td class="paramtype">Socket </td> |
| 210 | <td class="paramname"><em>s</em>, </td> |
| 211 | </tr> |
| 212 | <tr> |
| 213 | <td class="paramkey"></td> |
| 214 | <td></td> |
| 215 | <td class="paramtype">unsigned long int </td> |
| 216 | <td class="paramname"><em>cmd</em>, </td> |
| 217 | </tr> |
| 218 | <tr> |
| 219 | <td class="paramkey"></td> |
| 220 | <td></td> |
| 221 | <td class="paramtype">void * </td> |
| 222 | <td class="paramname"><em>arg</em> </td> |
| 223 | </tr> |
| 224 | <tr> |
| 225 | <td></td> |
| 226 | <td>)</td> |
| 227 | <td></td><td></td> |
| 228 | </tr> |
| 229 | </table> |
| 230 | </div><div class="memdoc"> |
| 231 | |
| 232 | <p class="definition">Definition at line <a class="el" href="_network_sockets_8cpp_source.html#l00069">69</a> of file <a class="el" href="_network_sockets_8cpp_source.html">NetworkSockets.cpp</a>.</p> |
| 233 | |
| 234 | <p class="reference">Referenced by <a class="el" href="_socket_profiling_connection_8cpp_source.html#l00078">SocketProfilingConnection::ReadPacket()</a>, and <a class="el" href="_gatord_mock_service_8cpp_source.html#l00214">GatordMockService::WaitCommand()</a>.</p> |
| 235 | <div class="fragment"><div class="line"><a name="l00070"></a><span class="lineno"> 70</span> {</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span> <span class="preprocessor">#if defined(__ANDROID__)</span></div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  <span class="keywordflow">return</span> ioctl(s, static_cast<int>(cmd), arg);</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span> <span class="preprocessor">#elif defined(__unix__)</span></div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  <span class="keywordflow">return</span> ioctl(s, cmd, arg);</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span> <span class="preprocessor">#elif defined(_MSC_VER)</span></div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <span class="keywordflow">return</span> ioctlsocket(s, cmd, static_cast<u_long*>(arg));</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span> }</div></div><!-- fragment --> |
| 236 | </div> |
| 237 | </div> |
| 238 | <a id="a242d840b21fc2f18ac1ec8d609180e15"></a> |
| 239 | <h2 class="memtitle"><span class="permalink"><a href="#a242d840b21fc2f18ac1ec8d609180e15">◆ </a></span>Poll()</h2> |
| 240 | |
| 241 | <div class="memitem"> |
| 242 | <div class="memproto"> |
| 243 | <table class="memname"> |
| 244 | <tr> |
| 245 | <td class="memname">int Poll </td> |
| 246 | <td>(</td> |
| 247 | <td class="paramtype">PollFd * </td> |
| 248 | <td class="paramname"><em>fds</em>, </td> |
| 249 | </tr> |
| 250 | <tr> |
| 251 | <td class="paramkey"></td> |
| 252 | <td></td> |
| 253 | <td class="paramtype">nfds_t </td> |
| 254 | <td class="paramname"><em>numFds</em>, </td> |
| 255 | </tr> |
| 256 | <tr> |
| 257 | <td class="paramkey"></td> |
| 258 | <td></td> |
| 259 | <td class="paramtype">int </td> |
| 260 | <td class="paramname"><em>timeout</em> </td> |
| 261 | </tr> |
| 262 | <tr> |
| 263 | <td></td> |
| 264 | <td>)</td> |
| 265 | <td></td><td></td> |
| 266 | </tr> |
| 267 | </table> |
| 268 | </div><div class="memdoc"> |
| 269 | |
| 270 | <p class="definition">Definition at line <a class="el" href="_network_sockets_8cpp_source.html#l00081">81</a> of file <a class="el" href="_network_sockets_8cpp_source.html">NetworkSockets.cpp</a>.</p> |
| 271 | |
| 272 | <p class="reference">Referenced by <a class="el" href="_socket_profiling_connection_8cpp_source.html#l00078">SocketProfilingConnection::ReadPacket()</a>, and <a class="el" href="_gatord_mock_service_8cpp_source.html#l00214">GatordMockService::WaitCommand()</a>.</p> |
| 273 | <div class="fragment"><div class="line"><a name="l00082"></a><span class="lineno"> 82</span> {</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span> <span class="preprocessor">#if defined(__unix__)</span></div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  <span class="keywordflow">return</span> poll(fds, numFds, timeout);</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span> <span class="preprocessor">#elif defined(_MSC_VER)</span></div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <span class="keywordflow">return</span> WSAPoll(fds, numFds, timeout);</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span> }</div></div><!-- fragment --> |
| 274 | </div> |
| 275 | </div> |
| 276 | <a id="a7b2c6949d9d76d2c0ffca916175e5322"></a> |
| 277 | <h2 class="memtitle"><span class="permalink"><a href="#a7b2c6949d9d76d2c0ffca916175e5322">◆ </a></span>Read()</h2> |
| 278 | |
| 279 | <div class="memitem"> |
| 280 | <div class="memproto"> |
| 281 | <table class="memname"> |
| 282 | <tr> |
| 283 | <td class="memname">long Read </td> |
| 284 | <td>(</td> |
| 285 | <td class="paramtype">Socket </td> |
| 286 | <td class="paramname"><em>s</em>, </td> |
| 287 | </tr> |
| 288 | <tr> |
| 289 | <td class="paramkey"></td> |
| 290 | <td></td> |
| 291 | <td class="paramtype">void * </td> |
| 292 | <td class="paramname"><em>buf</em>, </td> |
| 293 | </tr> |
| 294 | <tr> |
| 295 | <td class="paramkey"></td> |
| 296 | <td></td> |
| 297 | <td class="paramtype">size_t </td> |
| 298 | <td class="paramname"><em>len</em> </td> |
| 299 | </tr> |
| 300 | <tr> |
| 301 | <td></td> |
| 302 | <td>)</td> |
| 303 | <td></td><td></td> |
| 304 | </tr> |
| 305 | </table> |
| 306 | </div><div class="memdoc"> |
| 307 | |
| 308 | <p class="definition">Definition at line <a class="el" href="_network_sockets_8cpp_source.html#l00060">60</a> of file <a class="el" href="_network_sockets_8cpp_source.html">NetworkSockets.cpp</a>.</p> |
| 309 | |
| 310 | <p class="reference">Referenced by <a class="el" href="_socket_profiling_connection_8cpp_source.html#l00078">SocketProfilingConnection::ReadPacket()</a>, <a class="el" href="_gatord_mock_service_8cpp_source.html#l00214">GatordMockService::WaitCommand()</a>, and <a class="el" href="_gatord_mock_service_8cpp_source.html#l00069">GatordMockService::WaitForStreamMetaData()</a>.</p> |
| 311 | <div class="fragment"><div class="line"><a name="l00061"></a><span class="lineno"> 61</span> {</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span> <span class="preprocessor">#if defined(__unix__)</span></div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  <span class="keywordflow">return</span> read(s, buf, len);</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span> <span class="preprocessor">#elif defined(_MSC_VER)</span></div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  <span class="keywordflow">return</span> recv(s, static_cast<char*>(buf), len, 0);</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span> }</div></div><!-- fragment --> |
| 312 | </div> |
| 313 | </div> |
| 314 | <a id="a8396c0d14fc0e7284b175fedfeceef37"></a> |
| 315 | <h2 class="memtitle"><span class="permalink"><a href="#a8396c0d14fc0e7284b175fedfeceef37">◆ </a></span>SetNonBlocking()</h2> |
| 316 | |
| 317 | <div class="memitem"> |
| 318 | <div class="memproto"> |
| 319 | <table class="memname"> |
| 320 | <tr> |
| 321 | <td class="memname">bool SetNonBlocking </td> |
| 322 | <td>(</td> |
| 323 | <td class="paramtype">Socket </td> |
| 324 | <td class="paramname"><em>s</em></td><td>)</td> |
| 325 | <td></td> |
| 326 | </tr> |
| 327 | </table> |
| 328 | </div><div class="memdoc"> |
| 329 | |
| 330 | <p class="definition">Definition at line <a class="el" href="_network_sockets_8cpp_source.html#l00038">38</a> of file <a class="el" href="_network_sockets_8cpp_source.html">NetworkSockets.cpp</a>.</p> |
| 331 | |
| 332 | <p class="reference">Referenced by <a class="el" href="_gatord_mock_service_8cpp_source.html#l00149">GatordMockService::LaunchReceivingThread()</a>, and <a class="el" href="_socket_profiling_connection_8cpp_source.html#l00019">SocketProfilingConnection::SocketProfilingConnection()</a>.</p> |
| 333 | <div class="fragment"><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> {</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="preprocessor">#if defined(__unix__)</span></div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> currentFlags = fcntl(s, F_GETFL);</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  <span class="keywordflow">return</span> fcntl(s, F_SETFL, currentFlags | O_NONBLOCK) == 0;</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span> <span class="preprocessor">#elif defined(_MSC_VER)</span></div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  u_long mode = 1;</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  <span class="keywordflow">return</span> ioctlsocket(s, FIONBIO, &mode) == 0;</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span> }</div></div><!-- fragment --> |
| 334 | </div> |
| 335 | </div> |
| 336 | <a id="ad5b08981ac047ff0a3c7cb3442b9f161"></a> |
| 337 | <h2 class="memtitle"><span class="permalink"><a href="#ad5b08981ac047ff0a3c7cb3442b9f161">◆ </a></span>Write()</h2> |
| 338 | |
| 339 | <div class="memitem"> |
| 340 | <div class="memproto"> |
| 341 | <table class="memname"> |
| 342 | <tr> |
| 343 | <td class="memname">long Write </td> |
| 344 | <td>(</td> |
| 345 | <td class="paramtype">Socket </td> |
| 346 | <td class="paramname"><em>s</em>, </td> |
| 347 | </tr> |
| 348 | <tr> |
| 349 | <td class="paramkey"></td> |
| 350 | <td></td> |
| 351 | <td class="paramtype">const void * </td> |
| 352 | <td class="paramname"><em>buf</em>, </td> |
| 353 | </tr> |
| 354 | <tr> |
| 355 | <td class="paramkey"></td> |
| 356 | <td></td> |
| 357 | <td class="paramtype">size_t </td> |
| 358 | <td class="paramname"><em>len</em> </td> |
| 359 | </tr> |
| 360 | <tr> |
| 361 | <td></td> |
| 362 | <td>)</td> |
| 363 | <td></td><td></td> |
| 364 | </tr> |
| 365 | </table> |
| 366 | </div><div class="memdoc"> |
| 367 | |
| 368 | <p class="definition">Definition at line <a class="el" href="_network_sockets_8cpp_source.html#l00050">50</a> of file <a class="el" href="_network_sockets_8cpp_source.html">NetworkSockets.cpp</a>.</p> |
| 369 | |
| 370 | <p class="reference">Referenced by <a class="el" href="_inference_test_image_8hpp_source.html#l00079">InferenceTestImage::GetSizeInBytes()</a>, <a class="el" href="_gatord_mock_service_8cpp_source.html#l00214">GatordMockService::WaitCommand()</a>, and <a class="el" href="_socket_profiling_connection_8cpp_source.html#l00068">SocketProfilingConnection::WritePacket()</a>.</p> |
| 371 | <div class="fragment"><div class="line"><a name="l00051"></a><span class="lineno"> 51</span> {</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span> <span class="preprocessor">#if defined(__unix__)</span></div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  <span class="keywordflow">return</span> write(s, buf, len);</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> <span class="preprocessor">#elif defined(_MSC_VER)</span></div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  <span class="keywordflow">return</span> send(s, static_cast<const char*>(buf), len, 0);</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span> }</div></div><!-- fragment --> |
| 372 | </div> |
| 373 | </div> |
| 374 | </div><!-- contents --> |
| 375 | </div><!-- doc-content --> |
| 376 | <!-- start footer part --> |
| 377 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 378 | <ul> |
| 379 | <li class="navelem"><a class="el" href="namespacearmnn_utils.html">armnnUtils</a></li><li class="navelem"><a class="el" href="namespacearmnn_utils_1_1_sockets.html">Sockets</a></li> |
| 380 | <li class="footer">Generated on Fri Mar 13 2020 16:07:06 for ArmNN by |
| 381 | <a href="http://www.doxygen.org/index.html"> |
| 382 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> |
| 383 | </ul> |
| 384 | </div> |
| 385 | </body> |
| 386 | </html> |