⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 group__tcp__app__api.html

📁 Freescale mcu OpenTCP-1.0.4.doc.html.zip 文档
💻 HTML
📖 第 1 页 / 共 3 页
字号:
      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> INT8 tcp_close </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">INT8&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>sochandle</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p><dl compact><dt><b>Author: </b></dt><dd> <ul><li> Jari Lahti (<a href="mailto:jari.lahti@violasystems.com">jari.lahti@violasystems.com</a>) </ul></dl><dl compact><dt><b>Date: </b></dt><dd>21.07.2002 </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>sochandle</em>&nbsp;</td><td>handle to socket on which TCP connection is to be closed </td></tr></table></dl><dl compact><dt><b>Returns: </b></dt><dd> <ul><li> -2 - there is unacked data on this socket. Try again later. <li> -1 - Error <li> &gt;=0 - OK (connection closing procedure started. Handle to socket returned)</ul></dl>Invoke this function to start connetion closing procedure over a given socket. Note that connection is not immediately closed. It may take some time for that to happen. Event_listener function will be invoked with  appropriate event when that really happens. <p>Definition at line <a class="el" href="tcp_8c-source.html#l00549">549</a> of file <a class="el" href="tcp_8c-source.html">tcp.c</a>.<p>References <a class="el" href="tcp__ip_8h-source.html#l00622">tcb::flags</a>, <a class="el" href="tcp__ip_8h-source.html#l00627">tcb::myflags</a>, <a class="el" href="tcp__ip_8h-source.html#l00628">tcb::send_next</a>, <a class="el" href="tcp__ip_8h-source.html#l00626">tcb::send_unacked</a>, <a class="el" href="tcp__ip_8h-source.html#l00609">tcb::state</a>, <a class="el" href="tcp_8c-source.html#l02455">tcp_newstate()</a>, <a class="el" href="tcp_8c-source.html#l02253">tcp_sendcontrol()</a>, <a class="el" href="tcp__ip_8h-source.html#l00335">TCP_STATE_CLOSED</a>, <a class="el" href="tcp__ip_8h-source.html#l00353">TCP_STATE_CLOSING</a>, <a class="el" href="tcp__ip_8h-source.html#l00362">TCP_STATE_CONNECTED</a>, <a class="el" href="tcp__ip_8h-source.html#l00346">TCP_STATE_FINW1</a>, <a class="el" href="tcp__ip_8h-source.html#l00349">TCP_STATE_FINW2</a>, <a class="el" href="tcp__ip_8h-source.html#l00356">TCP_STATE_LAST_ACK</a>, <a class="el" href="tcp__ip_8h-source.html#l00336">TCP_STATE_LISTENING</a>, <a class="el" href="tcp__ip_8h-source.html#l00339">TCP_STATE_SYN_RECEIVED</a>, <a class="el" href="tcp__ip_8h-source.html#l00343">TCP_STATE_SYN_SENT</a>, and <a class="el" href="tcp__ip_8h-source.html#l00359">TCP_STATE_TIMED_WAIT</a>.    </td>  </tr></table><a name="a6" doxytag="tcp_ip.h::tcp_getstate"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> INT8 tcp_getstate </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">INT8&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>sochandle</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p><dl compact><dt><b>Author: </b></dt><dd> <ul><li> Jari Lahti (<a href="mailto:jari.lahti@violasystems.com">jari.lahti@violasystems.com</a>) </ul></dl><dl compact><dt><b>Date: </b></dt><dd>21.07.2002 </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>sochandle</em>&nbsp;</td><td>handle to the socket to be queried </td></tr></table></dl><dl compact><dt><b>Returns: </b></dt><dd> <ul><li> -1 - Error <li> &gt;0 - Socket state</ul></dl>Use this function for querying socket state. This is usually not needed directly, but could be usefull for some special purposes. <p>Definition at line <a class="el" href="tcp_8c-source.html#l00648">648</a> of file <a class="el" href="tcp_8c-source.html">tcp.c</a>.<p>References <a class="el" href="tcp__ip_8h-source.html#l00609">tcb::state</a>.    </td>  </tr></table><a name="a7" doxytag="tcp_ip.h::tcp_checksend"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> INT16 tcp_checksend </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">INT8&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>sochandle</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p><dl compact><dt><b>Author: </b></dt><dd> <ul><li> Jari Lahti (<a href="mailto:jari.lahti@violasystems.com">jari.lahti@violasystems.com</a>) </ul></dl><dl compact><dt><b>Date: </b></dt><dd>23.07.2002 </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>sochandle</em>&nbsp;</td><td>handle to the socket to be inspected </td></tr></table></dl><dl compact><dt><b>Returns: </b></dt><dd> <ul><li> -1 - not possible to send over a socket (previously sent data is still not akcnowledged) <li> &gt;0 - it is possible to send data over a socket</ul></dl>Invoke this function to get information whether it is possible to send data or not. This may, sometimes, be preffered way of getting this type of information to waiting for <a class="el" href="tcp__ip_8h.html#a58">TCP_EVENT_ACK</a> in event_listener function. <dl compact><dt><b>Examples: </b></dt><dd><a class="el" href="tcp__client__demo_8c-example.html#a4">tcp_client_demo.c</a>, and <a class="el" href="tcp__server__demo_8c-example.html#a4">tcp_server_demo.c</a>.</dl><p>Definition at line <a class="el" href="tcp_8c-source.html#l00690">690</a> of file <a class="el" href="tcp_8c-source.html">tcp.c</a>.<p>References <a class="el" href="tcp__ip_8h-source.html#l00629">tcb::send_mtu</a>, <a class="el" href="tcp__ip_8h-source.html#l00628">tcb::send_next</a>, <a class="el" href="tcp__ip_8h-source.html#l00626">tcb::send_unacked</a>, <a class="el" href="tcp__ip_8h-source.html#l00609">tcb::state</a>, and <a class="el" href="tcp__ip_8h-source.html#l00362">TCP_STATE_CONNECTED</a>.    </td>  </tr></table><a name="a8" doxytag="tcp_ip.h::tcp_abort"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> INT8 tcp_abort </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">INT8&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>sochandle</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p><dl compact><dt><b>Author: </b></dt><dd> <ul><li> Jari Lahti (<a href="mailto:jari.lahti@violasystems.com">jari.lahti@violasystems.com</a>) </ul></dl><dl compact><dt><b>Date: </b></dt><dd>21.07.2002 </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>sochandle</em>&nbsp;</td><td>handle to socket to be aborted </td></tr></table></dl><dl compact><dt><b>Returns: </b></dt><dd> <ul><li> -1 - error <li> &gt;=0 - OK (value represents handle to aborted socket)</ul></dl>Use this function in cases when TCP connection must be immediately closed. Note that the preffered (more elegant) way of closing the TCP connection is to invoke <a class="el" href="group__tcp__app__api.html#a5">tcp_close()</a> which starts a proper closing procedure. tcp_abort should be used only in cases when it is really necessary to  immediately and quickly close the connection. <p>Definition at line <a class="el" href="tcp_8c-source.html#l00736">736</a> of file <a class="el" href="tcp_8c-source.html">tcp.c</a>.<p>References <a class="el" href="tcp__ip_8h-source.html#l00627">tcb::myflags</a>, <a class="el" href="tcp__ip_8h-source.html#l00609">tcb::state</a>, <a class="el" href="tcp_8c-source.html#l02455">tcp_newstate()</a>, <a class="el" href="tcp_8c-source.html#l02253">tcp_sendcontrol()</a>, <a class="el" href="tcp__ip_8h-source.html#l00335">TCP_STATE_CLOSED</a>, <a class="el" href="tcp__ip_8h-source.html#l00353">TCP_STATE_CLOSING</a>, <a class="el" href="tcp__ip_8h-source.html#l00362">TCP_STATE_CONNECTED</a>, <a class="el" href="tcp__ip_8h-source.html#l00346">TCP_STATE_FINW1</a>, <a class="el" href="tcp__ip_8h-source.html#l00349">TCP_STATE_FINW2</a>, <a class="el" href="tcp__ip_8h-source.html#l00333">TCP_STATE_FREE</a>, <a class="el" href="tcp__ip_8h-source.html#l00356">TCP_STATE_LAST_ACK</a>, <a class="el" href="tcp__ip_8h-source.html#l00336">TCP_STATE_LISTENING</a>, <a class="el" href="tcp__ip_8h-source.html#l00334">TCP_STATE_RESERVED</a>, <a class="el" href="tcp__ip_8h-source.html#l00339">TCP_STATE_SYN_RECEIVED</a>, <a class="el" href="tcp__ip_8h-source.html#l00343">TCP_STATE_SYN_SENT</a>, and <a class="el" href="tcp__ip_8h-source.html#l00359">TCP_STATE_TIMED_WAIT</a>.    </td>  </tr></table><hr><address style="align: right;"><small>Generated on Sun Aug 3 20:33:01 2003 for OpenTCP by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -