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
doc/html/classwiconnect_1_1_socket_interface.html
- Committer:
- dan_ackme
- Date:
- 2014-10-27
- Revision:
- 29:b6af04b77a56
- Parent:
- 26:8067e3d463d3
File content as of revision 29:b6af04b77a56:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <title>ACKme WiConnect Host Library</title> <link rel="icon" href="favicon.ico" type="image/x-icon"> <link rel="shortcut icon" href="favicon.ico" type="image/x-icon"> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="resize.js"></script> <script type="text/javascript" src="navtree.js"></script> <script type="text/javascript"> $(document).ready(initResizable); $(window).load(resizeHeight); </script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { searchBox.OnSelectItem(0); }); </script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea" style="font-family:verdana;"> <table border='0' cellpadding='0' cellspacing='0' width="98%"> <tr style="height:20px"><td> </td></tr> <tr style="border-collapse: collapse; padding: 0;"> <td style="width:20px"></td> <td style="padding-right:40px"><img src="ackmelogo.png" alt="ACKme Logo" /></td> <td style="vertical-align:middle; text-align:left; font: bold 25px/100% Verdana, Arial, Helvetica, sans-serif;"> WiConnect Host Library- API Reference Guide</td> <td style="width:20px"></td> </tr> <tr><td> </td></tr> </table> </div><!-- Generated by Doxygen 1.8.7 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Library Overview</span></a></li> <li><a href="modules.html"><span>Library API</span></a></li> <li><a href="examples.html"><span>API Examples</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="http://wiconnect.ack.me/2.0/general_overview"><span>WiConnect Reference Manual</span></a></li> <li><a href="http://www.ack.me/WiConnect"><span>ACKme Website</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="classes.html"><span>Class Index</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> </div><!-- top --> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> <div id="nav-sync" class="sync"></div> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> $(document).ready(function(){initNavTree('classwiconnect_1_1_socket_interface.html','');}); </script> <div id="doc-content"> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Pages</a></div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> | <a href="classwiconnect_1_1_socket_interface-members.html">List of all members</a> </div> <div class="headertitle"> <div class="title">wiconnect::SocketInterface Class Reference<div class="ingroups"><a class="el" href="group__api__socket__types.html">Types</a></div></div> </div> </div><!--header--> <div class="contents"> <p>The provides an interface for creating TCP/UDP/TLS/HTTP client sockets. A client socket connects to a remote server. <a href="classwiconnect_1_1_socket_interface.html#details">More...</a></p> <p><code>#include <<a class="el" href="_socket_interface_8h_source.html">SocketInterface.h</a>></code></p> <p>Inherited by <a class="el" href="classwiconnect_1_1_wiconnect.html">wiconnect::Wiconnect</a>.</p> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr class="memitem:ga8a80d96efac7cc514fe7fc61d1878106"><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__misc.html#ga8a80d96efac7cc514fe7fc61d1878106">closeAllSockets</a> ()</td></tr> <tr class="memdesc:ga8a80d96efac7cc514fe7fc61d1878106"><td class="mdescLeft"> </td><td class="mdescRight">Close all opened sockets. <a href="group__api__socket__misc.html#ga8a80d96efac7cc514fe7fc61d1878106">More...</a><br /></td></tr> <tr class="separator:ga8a80d96efac7cc514fe7fc61d1878106"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:gab24204ef309b6e7a52b03b35a7046b45"><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__misc.html#gab24204ef309b6e7a52b03b35a7046b45">connect</a> (<a class="el" href="classwiconnect_1_1_wiconnect_socket.html">WiconnectSocket</a> &socket, <a class="el" href="group__api__socket__types.html#ga69dc55558df4c81599c5fb3dff98756d">SocketType</a> type, const char *host, uint16_t remortPort, uint16_t localPort, const void *args GPIO_IRQ_ARG)</td></tr> <tr class="memdesc:gab24204ef309b6e7a52b03b35a7046b45"><td class="mdescLeft"> </td><td class="mdescRight">Connect to remote server. <a href="group__api__socket__misc.html#gab24204ef309b6e7a52b03b35a7046b45">More...</a><br /></td></tr> <tr class="separator:gab24204ef309b6e7a52b03b35a7046b45"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:gad8e8632715a38222ce4fea5fe0aaf527"><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#gad8e8632715a38222ce4fea5fe0aaf527">tcpConnect</a> (<a class="el" href="classwiconnect_1_1_wiconnect_socket.html">WiconnectSocket</a> &socket, const char *host, uint16_t remortPort GPIO_IRQ_ARG_NC)</td></tr> <tr class="memdesc:gad8e8632715a38222ce4fea5fe0aaf527"><td class="mdescLeft"> </td><td class="mdescRight">Connect to remote TCP server. <a href="group__api__socket__tcp.html#gad8e8632715a38222ce4fea5fe0aaf527">More...</a><br /></td></tr> <tr class="separator:gad8e8632715a38222ce4fea5fe0aaf527"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ga9f4f3e53ea7f4e84d43529da8580aaaa"><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#ga9f4f3e53ea7f4e84d43529da8580aaaa">tcpListen</a> (uint16_t listeningPort, int maxClients=0 GPIO_IRQ_ARG_NC)</td></tr> <tr class="memdesc:ga9f4f3e53ea7f4e84d43529da8580aaaa"><td class="mdescLeft"> </td><td class="mdescRight">Start internal TCP server and listen on specified port. <a href="group__api__socket__tcp.html#ga9f4f3e53ea7f4e84d43529da8580aaaa">More...</a><br /></td></tr> <tr class="separator:ga9f4f3e53ea7f4e84d43529da8580aaaa"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ga9e12bc568b7e8d72152e53a90de13035"><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#ga9e12bc568b7e8d72152e53a90de13035">tcpAccept</a> (<a class="el" href="classwiconnect_1_1_wiconnect_socket.html">WiconnectSocket</a> &socket, uint32_t timeoutMs=<a class="el" href="group__api__core__macro.html#ga580e5f45fee866c845e0d3fd1eb1744a">WICONNECT_WAIT_FOREVER</a>)</td></tr> <tr class="memdesc:ga9e12bc568b7e8d72152e53a90de13035"><td class="mdescLeft"> </td><td class="mdescRight">Wait for next client to connect to TCP server. <a href="group__api__socket__tcp.html#ga9e12bc568b7e8d72152e53a90de13035">More...</a><br /></td></tr> <tr class="separator:ga9e12bc568b7e8d72152e53a90de13035"><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">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="group__api__socket__tcp.html#ga3d0137ebe308674e75f81457c38679d0">More...</a><br /></td></tr> <tr class="separator:ga3d0137ebe308674e75f81457c38679d0"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ga4e6e89eb9aedec1ff6d25645c33f51e4"><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__tls.html#ga4e6e89eb9aedec1ff6d25645c33f51e4">tlsConnect</a> (<a class="el" href="classwiconnect_1_1_wiconnect_socket.html">WiconnectSocket</a> &socket, const char *host, uint16_t remortPort, const char *certFilename=NULL GPIO_IRQ_ARG_NC)</td></tr> <tr class="memdesc:ga4e6e89eb9aedec1ff6d25645c33f51e4"><td class="mdescLeft"> </td><td class="mdescRight">Connect to remote TLS server. <a href="group__api__socket__tls.html#ga4e6e89eb9aedec1ff6d25645c33f51e4">More...</a><br /></td></tr> <tr class="separator:ga4e6e89eb9aedec1ff6d25645c33f51e4"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ga0ca5eabcd64ce45b574205447101f8aa"><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__udp.html#ga0ca5eabcd64ce45b574205447101f8aa">udpConnect</a> (<a class="el" href="classwiconnect_1_1_wiconnect_socket.html">WiconnectSocket</a> &socket, const char *host, uint16_t remortPort, uint16_t localPort=<a class="el" href="group__api__socket__macro.html#gae54117ebe433295ef992b9ca83c46d98">SOCKET_ANY_PORT</a> GPIO_IRQ_ARG_NC)</td></tr> <tr class="memdesc:ga0ca5eabcd64ce45b574205447101f8aa"><td class="mdescLeft"> </td><td class="mdescRight">Connect to remote UDP server. <a href="group__api__socket__udp.html#ga0ca5eabcd64ce45b574205447101f8aa">More...</a><br /></td></tr> <tr class="separator:ga0ca5eabcd64ce45b574205447101f8aa"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ga067fb0d662d8e27e3f5b561ded29a51a"><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__udp.html#ga067fb0d662d8e27e3f5b561ded29a51a">udpListen</a> (<a class="el" href="classwiconnect_1_1_wiconnect_udp_server.html">WiconnectUdpServer</a> &udpServer, uint16_t listeningPort)</td></tr> <tr class="memdesc:ga067fb0d662d8e27e3f5b561ded29a51a"><td class="mdescLeft"> </td><td class="mdescRight">Start a UDP server listening on the given port. <a href="group__api__socket__udp.html#ga067fb0d662d8e27e3f5b561ded29a51a">More...</a><br /></td></tr> <tr class="separator:ga067fb0d662d8e27e3f5b561ded29a51a"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ga181a03d883f60dff0c03b65e066f0eed"><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__http.html#ga181a03d883f60dff0c03b65e066f0eed">httpConnect</a> (<a class="el" href="classwiconnect_1_1_wiconnect_socket.html">WiconnectSocket</a> &socket, const char *url, const <a class="el" href="structwiconnect_1_1_http_socket_args.html">HttpSocketArgs</a> *args)</td></tr> <tr class="memdesc:ga181a03d883f60dff0c03b65e066f0eed"><td class="mdescLeft"> </td><td class="mdescRight">Connect to remote HTTP server. <a href="group__api__socket__http.html#ga181a03d883f60dff0c03b65e066f0eed">More...</a><br /></td></tr> <tr class="separator:ga181a03d883f60dff0c03b65e066f0eed"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:gac9b6c6a348f790cc8d43889dd72029f6"><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__http.html#gac9b6c6a348f790cc8d43889dd72029f6">httpGet</a> (<a class="el" href="classwiconnect_1_1_wiconnect_socket.html">WiconnectSocket</a> &socket, const char *url, bool openOnly=false, const char *certFilename=NULL)</td></tr> <tr class="memdesc:gac9b6c6a348f790cc8d43889dd72029f6"><td class="mdescLeft"> </td><td class="mdescRight">Issue HTTP GET Request. <a href="group__api__socket__http.html#gac9b6c6a348f790cc8d43889dd72029f6">More...</a><br /></td></tr> <tr class="separator:gac9b6c6a348f790cc8d43889dd72029f6"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ga1b6a3ebdbd164f0eb683fc335ef4d365"><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__http.html#ga1b6a3ebdbd164f0eb683fc335ef4d365">httpPost</a> (<a class="el" href="classwiconnect_1_1_wiconnect_socket.html">WiconnectSocket</a> &socket, const char *url, const char *contextType, bool openOnly=true, const char *certFilename=NULL)</td></tr> <tr class="memdesc:ga1b6a3ebdbd164f0eb683fc335ef4d365"><td class="mdescLeft"> </td><td class="mdescRight">Issue HTTP POST Request. <a href="group__api__socket__http.html#ga1b6a3ebdbd164f0eb683fc335ef4d365">More...</a><br /></td></tr> <tr class="separator:ga1b6a3ebdbd164f0eb683fc335ef4d365"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:gabcb3d69b2b1718e7ebe1ed171dec1f85"><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__http.html#gabcb3d69b2b1718e7ebe1ed171dec1f85">httpHead</a> (<a class="el" href="classwiconnect_1_1_wiconnect_socket.html">WiconnectSocket</a> &socket, const char *url, const char *certFilename=NULL)</td></tr> <tr class="memdesc:gabcb3d69b2b1718e7ebe1ed171dec1f85"><td class="mdescLeft"> </td><td class="mdescRight">Issue HTTP HEAD Request. <a href="group__api__socket__http.html#gabcb3d69b2b1718e7ebe1ed171dec1f85">More...</a><br /></td></tr> <tr class="separator:gabcb3d69b2b1718e7ebe1ed171dec1f85"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:gabed18edc44f464bac64ce8a6dc3617ec"><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__http.html#gabed18edc44f464bac64ce8a6dc3617ec">httpAddHeader</a> (<a class="el" href="classwiconnect_1_1_wiconnect_socket.html">WiconnectSocket</a> &socket, const char *key, const char *value)</td></tr> <tr class="memdesc:gabed18edc44f464bac64ce8a6dc3617ec"><td class="mdescLeft"> </td><td class="mdescRight">Add HTTP header key/value pair to opened HTTP request. <a href="group__api__socket__http.html#gabed18edc44f464bac64ce8a6dc3617ec">More...</a><br /></td></tr> <tr class="separator:gabed18edc44f464bac64ce8a6dc3617ec"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:gadf59ca0783b89ee32f205e33f1bd5517"><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__http.html#gadf59ca0783b89ee32f205e33f1bd5517">httpGetStatus</a> (<a class="el" href="classwiconnect_1_1_wiconnect_socket.html">WiconnectSocket</a> &socket, uint32_t *statusCodePtr)</td></tr> <tr class="memdesc:gadf59ca0783b89ee32f205e33f1bd5517"><td class="mdescLeft"> </td><td class="mdescRight">Get the HTTP status code from HTTP request. <a href="group__api__socket__http.html#gadf59ca0783b89ee32f205e33f1bd5517">More...</a><br /></td></tr> <tr class="separator:gadf59ca0783b89ee32f205e33f1bd5517"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><p>The provides an interface for creating TCP/UDP/TLS/HTTP client sockets. A client socket connects to a remote server. </p> <dl class="section note"><dt>Note</dt><dd>This class is an interface to the <a class="el" href="classwiconnect_1_1_wiconnect.html" title="The root WiConnect library class. This class inheriets all WiConnect functionality. ">Wiconnect</a> class. It should never be independently instantiated or the parent of another class. </dd></dl> <p>Definition at line <a class="el" href="_socket_interface_8h_source.html#l00063">63</a> of file <a class="el" href="_socket_interface_8h_source.html">SocketInterface.h</a>.</p> </div><hr/>The documentation for this class was generated from the following file:<ul> <li>C:/Users/reed/workspace/host-wiconnect/src/wiconnect/Wiconnect/api/<a class="el" href="_socket_interface_8h_source.html">SocketInterface.h</a></li> </ul> </div><!-- contents --> </div><!-- doc-content --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <ul> <li class="footer">© ACKme Networks 2014</li> </ul> </div> </body> </html>