Click here to Skip to main content
15,896,405 members
Articles / Programming Languages / C

A Generic C-Language TCP Client Application

Rate me:
Please Sign up or sign in to vote.
3.67/5 (2 votes)
9 May 2010CPOL4 min read 29.1K   793   20  
A library for writing simple TCP client applications
<!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"/>
<title>TcpClient2: util/Timeout.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>util/Timeout.h File Reference</h1>
<p>Public interface for the <a class="el" href="structTimeout.html" title="Structure representing timeout.">Timeout</a> facility.  
<a href="#_details">More...</a></p>
<div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dynsection">
<div class="center"><img src="Timeout_8h__dep__incl.png" border="0" usemap="#util_2Timeout_8hdep_map" alt=""/></div>
<map name="util_2Timeout_8hdep_map" id="util_2Timeout_8hdep">
<area shape="rect" href="Socket_8c.html" title="Implementation of the Socket facility." alt="" coords="5,83,77,112"/><area shape="rect" href="Timeout_8c.html" title="Implementation of the Timeout facility." alt="" coords="101,83,200,112"/></map>
</div>

<p><a href="Timeout_8h_source.html">Go to the source code of this file.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structTimeout.html">Timeout</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Structure representing timeout.  <a href="structTimeout.html#_details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="Timeout_8h.html#a3b78ef6eaf8bf61492b4f4d89bd5181c">TIMEOUT_WAIT_FOREVER</a>&nbsp;&nbsp;&nbsp;((<a class="el" href="config_8h.html#a91ad9478d81a7aaf2593e8d9c3d06a14">uint</a>)-1)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">No timeout.  <a href="#a3b78ef6eaf8bf61492b4f4d89bd5181c"></a><br/></td></tr>
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">TC2API void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="Timeout_8h.html#ad8599e1fdfec0ba14e3f4f415765d60c">timeout_init</a> (<a class="el" href="structTimeout.html">Timeout</a> *, <a class="el" href="config_8h.html#a91ad9478d81a7aaf2593e8d9c3d06a14">uint</a>)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">see <a class="el" href="structTimeout.html#a3c9170878cfae51d9dbf162d3fdcde55" title="Initializes a Timeout structure.">Timeout::timeout_init</a>  <a href="#ad8599e1fdfec0ba14e3f4f415765d60c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">TC2API <a class="el" href="config_8h.html#a91ad9478d81a7aaf2593e8d9c3d06a14">uint</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="Timeout_8h.html#a839fdd50bfbc7bbcd59f679a5fa96b30">timeout_remaining</a> (const <a class="el" href="structTimeout.html">Timeout</a> *)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">see <a class="el" href="Timeout_8h.html#a839fdd50bfbc7bbcd59f679a5fa96b30" title="see Time::timeout_remaining">Time::timeout_remaining</a>  <a href="#a839fdd50bfbc7bbcd59f679a5fa96b30"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Public interface for the <a class="el" href="structTimeout.html" title="Structure representing timeout.">Timeout</a> facility. </p>

<p>Definition in file <a class="el" href="Timeout_8h_source.html">Timeout.h</a>.</p>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="a3b78ef6eaf8bf61492b4f4d89bd5181c"></a><!-- doxytag: member="Timeout.h::TIMEOUT_WAIT_FOREVER" ref="a3b78ef6eaf8bf61492b4f4d89bd5181c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define TIMEOUT_WAIT_FOREVER&nbsp;&nbsp;&nbsp;((<a class="el" href="config_8h.html#a91ad9478d81a7aaf2593e8d9c3d06a14">uint</a>)-1)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>No timeout. </p>

<p>Definition at line <a class="el" href="Timeout_8h_source.html#l00032">32</a> of file <a class="el" href="Timeout_8h_source.html">Timeout.h</a>.</p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ad8599e1fdfec0ba14e3f4f415765d60c"></a><!-- doxytag: member="Timeout.h::timeout_init" ref="ad8599e1fdfec0ba14e3f4f415765d60c" args="(Timeout *, uint)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TC2API void timeout_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structTimeout.html">Timeout</a> *&nbsp;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="config_8h.html#a91ad9478d81a7aaf2593e8d9c3d06a14">uint</a>&nbsp;</td>
          <td class="paramname"></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>see <a class="el" href="structTimeout.html#a3c9170878cfae51d9dbf162d3fdcde55" title="Initializes a Timeout structure.">Timeout::timeout_init</a> </p>

</div>
</div>
<a class="anchor" id="a839fdd50bfbc7bbcd59f679a5fa96b30"></a><!-- doxytag: member="Timeout.h::timeout_remaining" ref="a839fdd50bfbc7bbcd59f679a5fa96b30" args="(const Timeout *)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TC2API <a class="el" href="config_8h.html#a91ad9478d81a7aaf2593e8d9c3d06a14">uint</a> timeout_remaining </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structTimeout.html">Timeout</a> *&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>see <a class="el" href="Timeout_8h.html#a839fdd50bfbc7bbcd59f679a5fa96b30" title="see Time::timeout_remaining">Time::timeout_remaining</a> </p>

</div>
</div>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Sat May 8 16:16:37 2010 for TcpClient2 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
zvx
Software Developer
Brazil Brazil
I'm a long-time software developer living in Brazil.

I've been developing software for retail and banking automation in C/C++ for many years now. In the old days I even did some COBOL programming, and some assembly for the 8080.

My experience ranges from low level software such as interface code for serial devices for DOS and Windows (bar code scanners, printers, cash dispensers, etc) and goes to writing end user applications for POS terminals and bank ATMs. In between I've done a great deal of TCP/IP programming using the basic Berkeley sockets interface, which is my main interest nowadays.

Comments and Discussions