Host library for controlling a WiConnect enabled Wi-Fi module.
Dependents: wiconnect-ota_example wiconnect-web_setup_example wiconnect-test-console wiconnect-tcp_server_example ... more
Diff: doc/html/group__api__socket__tcp.html
- Revision:
- 21:17bb3eddcbae
- Parent:
- 17:7268f365676b
- Child:
- 26:8067e3d463d3
--- a/doc/html/group__api__socket__tcp.html Sat Aug 23 05:57:52 2014 -0700 +++ b/doc/html/group__api__socket__tcp.html Tue Aug 26 16:38:19 2014 -0700 @@ -109,14 +109,59 @@ <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> Functions</h2></td></tr> -<tr class="memitem:gafe15edec5f45f82a2ef82f0b0d5a6cb0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__api__core__types.html#ga325637ed501728bd6c8c7a7982b9ce05">WiconnectResult</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__api__socket__tcp.html#gafe15edec5f45f82a2ef82f0b0d5a6cb0">wiconnect::SocketInterface::tcpConnect</a> (<a class="el" href="classwiconnect_1_1_wiconnect_socket.html">WiconnectSocket</a> &socket, const char *host, uint16_t remortPort, <a class="el" href="group__api__core__types.html#ga1cf4dfa71da0b0dc3dc707dacf56cc9c">Pin</a> irqPin=NC)</td></tr> -<tr class="memdesc:gafe15edec5f45f82a2ef82f0b0d5a6cb0"><td class="mdescLeft"> </td><td class="mdescRight">Connect to remote TCP server. <a href="#gafe15edec5f45f82a2ef82f0b0d5a6cb0">More...</a><br /></td></tr> -<tr class="separator:gafe15edec5f45f82a2ef82f0b0d5a6cb0"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ga4a788d604d759b5da51f682b998b9bd2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__api__core__types.html#ga325637ed501728bd6c8c7a7982b9ce05">WiconnectResult</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__api__socket__tcp.html#ga4a788d604d759b5da51f682b998b9bd2">wiconnect::SocketInterface::tcpConnect</a> (<a class="el" href="classwiconnect_1_1_wiconnect_socket.html">WiconnectSocket</a> &socket, const char *host, uint16_t remortPort, <a class="el" href="group__api__core__types.html#ga1cf4dfa71da0b0dc3dc707dacf56cc9c">Pin</a> irqPin=<a class="el" href="group__api__core__macro.html#gaa1dbeca66111f3a22d0ee6b122d69270">PIN_NC</a>)</td></tr> +<tr class="memdesc:ga4a788d604d759b5da51f682b998b9bd2"><td class="mdescLeft"> </td><td class="mdescRight">Connect to remote TCP server. <a href="#ga4a788d604d759b5da51f682b998b9bd2">More...</a><br /></td></tr> +<tr class="separator:ga4a788d604d759b5da51f682b998b9bd2"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ga563831b33089437233f128483d034578"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__api__core__types.html#ga325637ed501728bd6c8c7a7982b9ce05">WiconnectResult</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__api__socket__tcp.html#ga563831b33089437233f128483d034578">wiconnect::SocketInterface::tcpListen</a> (uint16_t listeningPort, int maxClients=0, <a class="el" href="group__api__core__types.html#ga1cf4dfa71da0b0dc3dc707dacf56cc9c">Pin</a> irqPin=<a class="el" href="group__api__core__macro.html#gaa1dbeca66111f3a22d0ee6b122d69270">PIN_NC</a>)</td></tr> +<tr class="memdesc:ga563831b33089437233f128483d034578"><td class="mdescLeft"> </td><td class="mdescRight">Start internal TCP server and listen on specified port. <a href="#ga563831b33089437233f128483d034578">More...</a><br /></td></tr> +<tr class="separator:ga563831b33089437233f128483d034578"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ga0ea4efc810c7c5a9fbd96fcc627633b3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__api__core__types.html#ga325637ed501728bd6c8c7a7982b9ce05">WiconnectResult</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__api__socket__tcp.html#ga0ea4efc810c7c5a9fbd96fcc627633b3">wiconnect::SocketInterface::tcpAccept</a> (<a class="el" href="classwiconnect_1_1_wiconnect_socket.html">WiconnectSocket</a> &socket, int timeoutMs=<a class="el" href="group__api__core__macro.html#ga580e5f45fee866c845e0d3fd1eb1744a">WICONNECT_WAIT_FOREVER</a>)</td></tr> +<tr class="memdesc:ga0ea4efc810c7c5a9fbd96fcc627633b3"><td class="mdescLeft"> </td><td class="mdescRight">Wait for next client to connect to TCP server. <a href="#ga0ea4efc810c7c5a9fbd96fcc627633b3">More...</a><br /></td></tr> +<tr class="separator:ga0ea4efc810c7c5a9fbd96fcc627633b3"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ga3d0137ebe308674e75f81457c38679d0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__api__core__types.html#ga325637ed501728bd6c8c7a7982b9ce05">WiconnectResult</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__api__socket__tcp.html#ga3d0137ebe308674e75f81457c38679d0">wiconnect::SocketInterface::tcpServerStop</a> (void)</td></tr> +<tr class="memdesc:ga3d0137ebe308674e75f81457c38679d0"><td class="mdescLeft"> </td><td class="mdescRight">Stop TCP server from listening on port. Close all connected clients. <a href="#ga3d0137ebe308674e75f81457c38679d0">More...</a><br /></td></tr> +<tr class="separator:ga3d0137ebe308674e75f81457c38679d0"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <p>TCP methods. </p> <h2 class="groupheader">Function Documentation</h2> -<a class="anchor" id="gafe15edec5f45f82a2ef82f0b0d5a6cb0"></a> +<a class="anchor" id="ga0ea4efc810c7c5a9fbd96fcc627633b3"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname"><a class="el" href="group__api__core__types.html#ga325637ed501728bd6c8c7a7982b9ce05">WiconnectResult</a> wiconnect::SocketInterface::tcpAccept </td> + <td>(</td> + <td class="paramtype"><a class="el" href="classwiconnect_1_1_wiconnect_socket.html">WiconnectSocket</a> & </td> + <td class="paramname"><em>socket</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">int </td> + <td class="paramname"><em>timeoutMs</em> = <code><a class="el" href="group__api__core__macro.html#ga580e5f45fee866c845e0d3fd1eb1744a">WICONNECT_WAIT_FOREVER</a></code> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>Wait for next client to connect to TCP server. </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">socket</td><td>Socket to connected client </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">timeoutMs</td><td>Optional, specifiy maximum amount of time in ms to wait for a client </td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd>Result of method. See <a class="el" href="group__api__core__types.html#ga325637ed501728bd6c8c7a7982b9ce05">WiconnectResult</a> </dd></dl> + +</div> +</div> +<a class="anchor" id="ga4a788d604d759b5da51f682b998b9bd2"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> @@ -142,7 +187,7 @@ <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="group__api__core__types.html#ga1cf4dfa71da0b0dc3dc707dacf56cc9c">Pin</a> </td> - <td class="paramname"><em>irqPin</em> = <code>NC</code> </td> + <td class="paramname"><em>irqPin</em> = <code><a class="el" href="group__api__core__macro.html#gaa1dbeca66111f3a22d0ee6b122d69270">PIN_NC</a></code> </td> </tr> <tr> <td></td> @@ -166,6 +211,68 @@ </div> </div> +<a class="anchor" id="ga563831b33089437233f128483d034578"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname"><a class="el" href="group__api__core__types.html#ga325637ed501728bd6c8c7a7982b9ce05">WiconnectResult</a> wiconnect::SocketInterface::tcpListen </td> + <td>(</td> + <td class="paramtype">uint16_t </td> + <td class="paramname"><em>listeningPort</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">int </td> + <td class="paramname"><em>maxClients</em> = <code>0</code>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype"><a class="el" href="group__api__core__types.html#ga1cf4dfa71da0b0dc3dc707dacf56cc9c">Pin</a> </td> + <td class="paramname"><em>irqPin</em> = <code><a class="el" href="group__api__core__macro.html#gaa1dbeca66111f3a22d0ee6b122d69270">PIN_NC</a></code> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>Start internal TCP server and listen on specified port. </p> +<dl class="params"><dt>Parameters</dt><dd> + <table class="params"> + <tr><td class="paramdir">[in]</td><td class="paramname">listeningPort</td><td>The local port the server should listen on </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">maxClients</td><td>Optional, the maximum simultaneous connected clients, 0 is default, 1-8 valid range </td></tr> + <tr><td class="paramdir">[in]</td><td class="paramname">irqPin</td><td>Optional, Data available external interrupt pin. See <a class="el" href="group__api__socket__misc.html#ga94d1eb5407cb8b60ad366ecbe0e1b52a" title="Register a host pin as an external interrupt. When the external interrupt is triggered, the supplied callback is executed. ">registerSocketIrqHandler()</a> for more info </td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd>Result of method. See <a class="el" href="group__api__core__types.html#ga325637ed501728bd6c8c7a7982b9ce05">WiconnectResult</a> </dd></dl> + +</div> +</div> +<a class="anchor" id="ga3d0137ebe308674e75f81457c38679d0"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname"><a class="el" href="group__api__core__types.html#ga325637ed501728bd6c8c7a7982b9ce05">WiconnectResult</a> wiconnect::SocketInterface::tcpServerStop </td> + <td>(</td> + <td class="paramtype">void </td> + <td class="paramname"></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>Stop TCP server from listening on port. Close all connected clients. </p> +<dl class="section return"><dt>Returns</dt><dd>Result of method. See <a class="el" href="group__api__core__types.html#ga325637ed501728bd6c8c7a7982b9ce05">WiconnectResult</a> </dd></dl> + +</div> +</div> </div><!-- contents --> </div><!-- doc-content --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->