📄 classclient.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>client class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body bgcolor="#ffffff"><!-- Generated by Doxygen 1.2.13.1 --><h1>client Class Reference</h1>Class for sending/reciving data from/to server. <a href="#_details">More...</a><p><code>#include <<a class="el" href="client_8h-source.html">client.h</a>></code><p>Inheritance diagram for client:<p><center><img src="classclient__inherit__graph.gif" border="0" usemap="#client__inherit__map" alt="Inheritance graph"></center><map name="client__inherit__map"><area href="classclientDemo.html" shape="rect" coords="14,153,89,172" alt=""><area href="classtcpip.html" shape="rect" coords="31,15,71,33" alt=""></map><center><font size="2">[<a target="top" href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for client:<p><center><img src="classclient__coll__graph.gif" border="0" usemap="#client__coll__map" alt="Collaboration graph"></center><map name="client__coll__map"><area href="classtcpip.html" shape="rect" coords="50,106,90,124" alt=""></map><center><font size="2">[<a target="top" href="graph_legend.html">legend</a>]</font></center><table border=0 cellpadding=0 cellspacing=0><tr><td colspan=2><br><h2>Public Methods</h2></td></tr><tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classclient.html#a0">client</a> ()</td></tr><tr><td> </td><td><font size=-1><em>Default constructor.</em> <a href="#a0">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classclient.html#a1">~client</a> ()</td></tr><tr><td> </td><td><font size=-1><em>Default destructor.</em> <a href="#a1">More...</a><em></em></font><br><br></td></tr><tr><td colspan=2><br><h2>Protected Methods</h2></td></tr><tr><td nowrap align=right valign=top>char * </td><td valign=bottom><a class="el" href="classclient.html#b0">get_recived</a> ()</td></tr><tr><td> </td><td><font size=-1><em>Returns last recived data.</em> <a href="#b0">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classclient.html#b1">send</a> (char *host, char *service, char *packet)</td></tr><tr><td> </td><td><font size=-1><em>Sends data (string) to the server.</em> <a href="#b1">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classclient.html#b2">recive</a> (char *host, char *service, char *packet)</td></tr><tr><td> </td><td><font size=-1><em>Sends data (string) to the server, waits for response from this server and then recives it.</em> <a href="#b2">More...</a><em></em></font><br><br></td></tr><tr><td colspan=2><br><h2>Private Attributes</h2></td></tr><tr><td nowrap align=right valign=top>char * </td><td valign=bottom><a class="el" href="classclient.html#o0">recived</a></td></tr><tr><td> </td><td><font size=-1><em>Last recived string.</em> <a href="#o0">More...</a><em></em></font><br><br></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>Class for sending/reciving data from/to server.<p>Implements network client. <dl compact><dt><b>Author: </b><dd>Marcin Caban </dl><dl compact><dt><b>Date: </b><dd>Thu Jan 17 01:41:18 2002 </dl><p><p>Definition at line <a class="el" href="client_8h-source.html#l00041">41</a> of file <a class="el" href="client_8h-source.html">client.h</a>.<hr><h2>Constructor & Destructor Documentation</h2><a name="a0" doxytag="client::client"></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"> client::client </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Default constructor.<p>Initialize variables. <dl compact><dt><b>Author: </b><dd>Marcin Caban </dl><dl compact><dt><b>Date: </b><dd>Thu Jan 17 01:41:18 2002 </dl><p>Definition at line <a class="el" href="client_8cc-source.html#l00048">48</a> of file <a class="el" href="client_8cc-source.html">client.cc</a>.<p>References <a class="el" href="client_8h-source.html#l00091">recived</a>. </td> </tr></table><a name="a1" doxytag="client::~client"></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"> client::~client </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Default destructor.<p>Free any allocated momory. <dl compact><dt><b>Author: </b><dd>Marcin Caban </dl><dl compact><dt><b>Date: </b><dd>Thu Jan 17 01:41:18 2002 </dl><p>Definition at line <a class="el" href="client_8cc-source.html#l00053">53</a> of file <a class="el" href="client_8cc-source.html">client.cc</a>.<p>References <a class="el" href="client_8h-source.html#l00091">recived</a>. </td> </tr></table><hr><h2>Member Function Documentation</h2><a name="b0" doxytag="client::get_recived"></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"> char * client::get_recived </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [protected]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Returns last recived data.<p><dl compact><dt><b>Returns: </b><dd>recived string </dl><dl compact><dt><b>Author: </b><dd>Marcin Caban </dl><dl compact><dt><b>Date: </b><dd>Thu Jan 17 01:41:18 2002 </dl><p>Definition at line <a class="el" href="client_8cc-source.html#l00112">112</a> of file <a class="el" href="client_8cc-source.html">client.cc</a>.<p>References <a class="el" href="client_8h-source.html#l00091">recived</a>.<p>Referenced by <a class="el" href="clientDemo_8cc-source.html#l00058">clientDemo::start</a>(). </td> </tr></table><a name="b2" doxytag="client::recive"></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"> bool client::recive </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">char * </td> <td class="mdname" nowrap> <em>host</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>char * </td> <td class="mdname" nowrap> <em>service</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>char * </td> <td class="mdname" nowrap> <em>packet</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"><code> [protected]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Sends data (string) to the server, waits for response from this server and then recives it.<p><dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>host</em> </td><td>hostname or IP address of the server </td></tr><tr><td valign=top><em>service</em> </td><td>port number of the server </td></tr><tr><td valign=top><em>packet</em> </td><td>a string to send </td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>"true" if everything is OK or "false" if there is an error </dl><dl compact><dt><b><a class="el" href="bug.html#_bug000001">Bug: </a></b><dd>Timeout doesn't seem to work correctly.</dl> <dl compact><dt><b>Author: </b><dd>Marcin Caban </dl><dl compact><dt><b>Date: </b><dd>Thu Jan 17 01:41:18 2002 </dl><p>Definition at line <a class="el" href="client_8cc-source.html#l00068">68</a> of file <a class="el" href="client_8cc-source.html">client.cc</a>.<p>References <a class="el" href="const_8h-source.html#l00035">_NET_ERR_</a>, <a class="el" href="tcpip_8cc-source.html#l00066">tcpip::connectUDP</a>(), <a class="el" href="client_8cc-source.html#l00044">errno</a>, <a class="el" href="client_8h-source.html#l00091">recived</a>, and <a class="el" href="client_8cc-source.html#l00045">sys_errlist</a>.<p>Referenced by <a class="el" href="clientDemo_8cc-source.html#l00058">clientDemo::start</a>(). </td> </tr></table><a name="b1" doxytag="client::send"></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"> void client::send </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">char * </td> <td class="mdname" nowrap> <em>host</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>char * </td> <td class="mdname" nowrap> <em>service</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>char * </td> <td class="mdname" nowrap> <em>packet</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"><code> [protected]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Sends data (string) to the server.<p><dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>host</em> </td><td>hostname or IP address of the server </td></tr><tr><td valign=top><em>service</em> </td><td>port number of the server </td></tr><tr><td valign=top><em>packet</em> </td><td>a string to send </td></tr></table></dl><dl compact><dt><b>Author: </b><dd>Marcin Caban </dl><dl compact><dt><b>Date: </b><dd>Thu Jan 17 01:41:18 2002 </dl><p>Definition at line <a class="el" href="client_8cc-source.html#l00060">60</a> of file <a class="el" href="client_8cc-source.html">client.cc</a>.<p>References <a class="el" href="tcpip_8cc-source.html#l00066">tcpip::connectUDP</a>().<p>Referenced by <a class="el" href="clientDemo_8cc-source.html#l00058">clientDemo::start</a>(). </td> </tr></table><hr><h2>Field Documentation</h2><a name="o0" doxytag="client::recived"></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"> char* client::recived<code> [private]</code> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Last recived string.<p>Stores last recived data from a server. <p>Definition at line <a class="el" href="client_8h-source.html#l00091">91</a> of file <a class="el" href="client_8h-source.html">client.h</a>.<p>Referenced by <a class="el" href="client_8cc-source.html#l00048">client</a>(), <a class="el" href="client_8cc-source.html#l00112">get_recived</a>(), <a class="el" href="client_8cc-source.html#l00068">recive</a>(), and <a class="el" href="client_8cc-source.html#l00053">~client</a>(). </td> </tr></table><hr><address><small>© 2002 Marcin Caban 'Cabko' and Borys Wisniewski 'Boria'</small></address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -