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-08-13
Revision:
16:7f1d6d359787
Parent:
13:2b51f5267c92
Child:
17:7268f365676b

File content as of revision 16:7f1d6d359787:

<!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>&nbsp;</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>&nbsp;</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&#160;Overview</span></a></li>
      <li><a href="modules.html"><span>Library&#160;API</span></a></li>
      <li><a href="examples.html"><span>API&#160;Examples</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="http://wiconnect.ack.me/1.2/general_overview"><span>WiConnect&#160;Reference&#160;Manual</span></a></li>
      <li><a href="http://www.ack.me/WiConnect"><span>ACKme&#160;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&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;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">&#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>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</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> &#124;
<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 &lt;<a class="el" href="_socket_interface_8h_source.html">SocketInterface.h</a>&gt;</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>&#160;</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">&#160;</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">&#160;</td></tr>
<tr class="memitem:ga94d1eb5407cb8b60ad366ecbe0e1b52a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__api__core__types.html#ga325637ed501728bd6c8c7a7982b9ce05">WiconnectResult</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api__socket__misc.html#ga94d1eb5407cb8b60ad366ecbe0e1b52a">registerSocketIrqHandler</a> (<a class="el" href="group__api__core__types.html#ga1cf4dfa71da0b0dc3dc707dacf56cc9c">Pin</a> irqPin, const <a class="el" href="classwiconnect_1_1_callback.html">Callback</a> &amp;handler)</td></tr>
<tr class="memdesc:ga94d1eb5407cb8b60ad366ecbe0e1b52a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Register a host pin as an external interrupt. When the external interrupt is triggered, the supplied callback is executed.  <a href="group__api__socket__misc.html#ga94d1eb5407cb8b60ad366ecbe0e1b52a">More...</a><br /></td></tr>
<tr class="separator:ga94d1eb5407cb8b60ad366ecbe0e1b52a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga820d2fdb12d343212638e55633bd8551"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__api__core__types.html#ga325637ed501728bd6c8c7a7982b9ce05">WiconnectResult</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api__socket__misc.html#ga820d2fdb12d343212638e55633bd8551">unregisterSocketIrqHandler</a> (<a class="el" href="group__api__core__types.html#ga1cf4dfa71da0b0dc3dc707dacf56cc9c">Pin</a> irqPin)</td></tr>
<tr class="memdesc:ga820d2fdb12d343212638e55633bd8551"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unregister a previously registered IRQ pin.  <a href="group__api__socket__misc.html#ga820d2fdb12d343212638e55633bd8551">More...</a><br /></td></tr>
<tr class="separator:ga820d2fdb12d343212638e55633bd8551"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf9a5b041736d79110a90716f1aaf9a6b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__api__core__types.html#ga325637ed501728bd6c8c7a7982b9ce05">WiconnectResult</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api__socket__misc.html#gaf9a5b041736d79110a90716f1aaf9a6b">connect</a> (<a class="el" href="classwiconnect_1_1_socket.html">Socket</a> &amp;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, <a class="el" href="group__api__core__types.html#ga1cf4dfa71da0b0dc3dc707dacf56cc9c">Pin</a> irqPin)</td></tr>
<tr class="memdesc:gaf9a5b041736d79110a90716f1aaf9a6b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connect to remote server.  <a href="group__api__socket__misc.html#gaf9a5b041736d79110a90716f1aaf9a6b">More...</a><br /></td></tr>
<tr class="separator:gaf9a5b041736d79110a90716f1aaf9a6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga74f8ac6b81d3b96a26411b4faffc6a01"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__api__core__types.html#ga325637ed501728bd6c8c7a7982b9ce05">WiconnectResult</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api__socket__tcp.html#ga74f8ac6b81d3b96a26411b4faffc6a01">tcpConnect</a> (<a class="el" href="classwiconnect_1_1_socket.html">Socket</a> &amp;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:ga74f8ac6b81d3b96a26411b4faffc6a01"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connect to remote TCP server.  <a href="group__api__socket__tcp.html#ga74f8ac6b81d3b96a26411b4faffc6a01">More...</a><br /></td></tr>
<tr class="separator:ga74f8ac6b81d3b96a26411b4faffc6a01"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga559cb4c055639a83fce560693dff4870"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__api__core__types.html#ga325637ed501728bd6c8c7a7982b9ce05">WiconnectResult</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api__socket__tls.html#ga559cb4c055639a83fce560693dff4870">tlsConnect</a> (<a class="el" href="classwiconnect_1_1_socket.html">Socket</a> &amp;socket, const char *host, uint16_t remortPort, const char *certFilename=NULL, <a class="el" href="group__api__core__types.html#ga1cf4dfa71da0b0dc3dc707dacf56cc9c">Pin</a> irqPin=NC)</td></tr>
<tr class="memdesc:ga559cb4c055639a83fce560693dff4870"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connect to remote TLS server.  <a href="group__api__socket__tls.html#ga559cb4c055639a83fce560693dff4870">More...</a><br /></td></tr>
<tr class="separator:ga559cb4c055639a83fce560693dff4870"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1a7ee47642c572db433e68eaee65c44c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__api__core__types.html#ga325637ed501728bd6c8c7a7982b9ce05">WiconnectResult</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api__socket__udp.html#ga1a7ee47642c572db433e68eaee65c44c">udpConnect</a> (<a class="el" href="classwiconnect_1_1_socket.html">Socket</a> &amp;socket, const char *host, uint16_t remortPort, uint16_t localPort=<a class="el" href="group__api__socket__macro.html#gae54117ebe433295ef992b9ca83c46d98">SOCKET_ANY_PORT</a>, <a class="el" href="group__api__core__types.html#ga1cf4dfa71da0b0dc3dc707dacf56cc9c">Pin</a> irqPin=NC)</td></tr>
<tr class="memdesc:ga1a7ee47642c572db433e68eaee65c44c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connect to remote UDP server.  <a href="group__api__socket__udp.html#ga1a7ee47642c572db433e68eaee65c44c">More...</a><br /></td></tr>
<tr class="separator:ga1a7ee47642c572db433e68eaee65c44c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab2d562c96f8f40d916fc1df1229f0e09"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__api__core__types.html#ga325637ed501728bd6c8c7a7982b9ce05">WiconnectResult</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api__socket__http.html#gab2d562c96f8f40d916fc1df1229f0e09">httpConnect</a> (<a class="el" href="classwiconnect_1_1_socket.html">Socket</a> &amp;socket, const char *url, const <a class="el" href="structwiconnect_1_1_http_socket_args.html">HttpSocketArgs</a> *args)</td></tr>
<tr class="memdesc:gab2d562c96f8f40d916fc1df1229f0e09"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connect to remote HTTP server.  <a href="group__api__socket__http.html#gab2d562c96f8f40d916fc1df1229f0e09">More...</a><br /></td></tr>
<tr class="separator:gab2d562c96f8f40d916fc1df1229f0e09"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga818f9fc3d616deb5ac009f001e5e611b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__api__core__types.html#ga325637ed501728bd6c8c7a7982b9ce05">WiconnectResult</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api__socket__http.html#ga818f9fc3d616deb5ac009f001e5e611b">httpGet</a> (<a class="el" href="classwiconnect_1_1_socket.html">Socket</a> &amp;socket, const char *url, bool openOnly=false, const char *certFilename=NULL)</td></tr>
<tr class="memdesc:ga818f9fc3d616deb5ac009f001e5e611b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Issue HTTP GET Request.  <a href="group__api__socket__http.html#ga818f9fc3d616deb5ac009f001e5e611b">More...</a><br /></td></tr>
<tr class="separator:ga818f9fc3d616deb5ac009f001e5e611b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaaa5cb3c4b27ed0f2002e81392606a756"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__api__core__types.html#ga325637ed501728bd6c8c7a7982b9ce05">WiconnectResult</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api__socket__http.html#gaaa5cb3c4b27ed0f2002e81392606a756">httpPost</a> (<a class="el" href="classwiconnect_1_1_socket.html">Socket</a> &amp;socket, const char *url, const char *contextType, bool openOnly=true, const char *certFilename=NULL)</td></tr>
<tr class="memdesc:gaaa5cb3c4b27ed0f2002e81392606a756"><td class="mdescLeft">&#160;</td><td class="mdescRight">Issue HTTP POST Request.  <a href="group__api__socket__http.html#gaaa5cb3c4b27ed0f2002e81392606a756">More...</a><br /></td></tr>
<tr class="separator:gaaa5cb3c4b27ed0f2002e81392606a756"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga949cee4543c91951219652bd6282049f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__api__core__types.html#ga325637ed501728bd6c8c7a7982b9ce05">WiconnectResult</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api__socket__http.html#ga949cee4543c91951219652bd6282049f">httpHead</a> (<a class="el" href="classwiconnect_1_1_socket.html">Socket</a> &amp;socket, const char *url, const char *certFilename=NULL)</td></tr>
<tr class="memdesc:ga949cee4543c91951219652bd6282049f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Issue HTTP HEAD Request.  <a href="group__api__socket__http.html#ga949cee4543c91951219652bd6282049f">More...</a><br /></td></tr>
<tr class="separator:ga949cee4543c91951219652bd6282049f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2b3fd9a84f173312318e2bb22cef2004"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__api__core__types.html#ga325637ed501728bd6c8c7a7982b9ce05">WiconnectResult</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api__socket__http.html#ga2b3fd9a84f173312318e2bb22cef2004">httpAddHeader</a> (<a class="el" href="classwiconnect_1_1_socket.html">Socket</a> &amp;socket, const char *key, const char *value)</td></tr>
<tr class="memdesc:ga2b3fd9a84f173312318e2bb22cef2004"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add HTTP header key/value pair to opened HTTP request.  <a href="group__api__socket__http.html#ga2b3fd9a84f173312318e2bb22cef2004">More...</a><br /></td></tr>
<tr class="separator:ga2b3fd9a84f173312318e2bb22cef2004"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0cad302f741f3f58a2fda54b67110a70"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__api__core__types.html#ga325637ed501728bd6c8c7a7982b9ce05">WiconnectResult</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api__socket__http.html#ga0cad302f741f3f58a2fda54b67110a70">httpGetStatus</a> (<a class="el" href="classwiconnect_1_1_socket.html">Socket</a> &amp;socket, uint32_t *statusCodePtr)</td></tr>
<tr class="memdesc:ga0cad302f741f3f58a2fda54b67110a70"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the HTTP status code from HTTP request.  <a href="group__api__socket__http.html#ga0cad302f741f3f58a2fda54b67110a70">More...</a><br /></td></tr>
<tr class="separator:ga0cad302f741f3f58a2fda54b67110a70"><td class="memSeparator" colspan="2">&#160;</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#l00051">51</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/<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">&copy; ACKme Networks 2014</li>
  </ul>
</div>
</body>
</html>