<!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>InspIRCd: connection class Reference</title> <link href="inspircd.doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.3.3 --> <div class="qindex"><a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Compound List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Compound Members</a> | <a class="qindex" href="globals.html">File Members</a></div> <h1>connection Class Reference</h1>Please note: classes serverrec and userrec both inherit from class connection. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="connection_8h-source.html">connection.h</a>></code> <p> Inheritance diagram for connection:<p><center><img src="classconnection__inherit__graph.gif" border="0" usemap="#connection__inherit__map" alt="Inheritance graph"></center> <map name="connection__inherit__map"> <area href="classserverrec.html" shape="rect" coords="8,232,85,258" alt=""> <area href="classuserrec.html" shape="rect" coords="109,232,176,258" alt=""> <area href="classExtensible.html" shape="rect" coords="53,82,136,109" alt=""> <area href="classclassbase.html" shape="rect" coords="54,8,134,34" alt=""> </map> <center><font size="2">[<a target="top" href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for connection:<p><center><img src="classconnection__coll__graph.gif" border="0" usemap="#connection__coll__map" alt="Collaboration graph"></center> <map name="connection__coll__map"> <area href="classExtensible.html" shape="rect" coords="86,237,169,264" alt=""> <area href="classclassbase.html" shape="rect" coords="69,98,149,125" alt=""> </map> <center><font size="2">[<a target="top" href="graph_legend.html">legend</a>]</font></center><a href="classconnection-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0> <tr><td></td></tr> <tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#a0">connection</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. </em> <a href="#a0"></a><em><br><br></td></tr> <tr><td colspan=2><br><h2>Public Attributes</h2></td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>int </td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#o0">fd</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">File descriptor of the connection. </em> <a href="#o0"></a><em><br><br></td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>char </td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#o1">host</a> [160]</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Hostname of connection. </em> <a href="#o1"></a><em><br><br></td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>char </td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#o2">ip</a> [16]</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">IP of connection. </em> <a href="#o2"></a><em><br><br></td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>int </td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#o3">bytes_in</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Stats counter for bytes inbound. </em> <a href="#o3"></a><em><br><br></td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>int </td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#o4">bytes_out</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Stats counter for bytes outbound. </em> <a href="#o4"></a><em><br><br></td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>int </td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#o5">cmds_in</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Stats counter for commands inbound. </em> <a href="#o5"></a><em><br><br></td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>int </td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#o6">cmds_out</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Stats counter for commands outbound. </em> <a href="#o6"></a><em><br><br></td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#o7">haspassed</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">True if server/user has authenticated, false if otherwise. </em> <a href="#o7"></a><em><br><br></td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>int </td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#o8">port</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Port number For a userrec, this is the port they connected to the network on. </em> <a href="#o8"></a><em><br><br></td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>char </td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#o9">registered</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Used by userrec to indicate the registration status of the connection. </em> <a href="#o9"></a><em><br><br></td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>time_t </td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#o10">lastping</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Time the connection was last pinged. </em> <a href="#o10"></a><em><br><br></td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>time_t </td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#o11">signon</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Time the connection was created, set in the constructor. </em> <a href="#o11"></a><em><br><br></td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>time_t </td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#o12">idle_lastmsg</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Time that the connection last sent data, used to calculate idle time. </em> <a href="#o12"></a><em><br><br></td></tr> <tr><td class="memItemLeft" nowrap align=right valign=top>time_t </td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#o13">nping</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Used by PING checks with clients. </em> <a href="#o13"></a><em><br><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> Please note: classes serverrec and userrec both inherit from class connection. <p> <p> Definition at line <a class="el" href="connection_8h-source.html#l00296">296</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>.<hr><h2>Constructor & Destructor Documentation</h2> <a name="a0" doxytag="connection::connection"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> connection::connection </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> </td> </tr> </table> <hr><h2>Member Data Documentation</h2> <a name="o3" doxytag="connection::bytes_in"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> int <a class="el" href="classconnection.html#o3">connection::bytes_in</a> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Stats counter for bytes inbound. <p> <p> Definition at line <a class="el" href="connection_8h-source.html#l00313">313</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>. <p> Referenced by <a class="el" href="users_8cpp-source.html#l00031">userrec::userrec()</a>. </td> </tr> </table> <a name="o4" doxytag="connection::bytes_out"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> int <a class="el" href="classconnection.html#o4">connection::bytes_out</a> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Stats counter for bytes outbound. <p> <p> Definition at line <a class="el" href="connection_8h-source.html#l00317">317</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>. <p> Referenced by <a class="el" href="users_8cpp-source.html#l00262">userrec::FlushWriteBuf()</a>, and <a class="el" href="users_8cpp-source.html#l00031">userrec::userrec()</a>. </td> </tr> </table> <a name="o5" doxytag="connection::cmds_in"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> int <a class="el" href="classconnection.html#o5">connection::cmds_in</a> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Stats counter for commands inbound. <p> <p> Definition at line <a class="el" href="connection_8h-source.html#l00321">321</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>. <p> Referenced by <a class="el" href="users_8cpp-source.html#l00031">userrec::userrec()</a>. </td> </tr> </table> <a name="o6" doxytag="connection::cmds_out"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> int <a class="el" href="classconnection.html#o6">connection::cmds_out</a> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Stats counter for commands outbound. <p> <p> Definition at line <a class="el" href="connection_8h-source.html#l00325">325</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>. <p> Referenced by <a class="el" href="users_8cpp-source.html#l00262">userrec::FlushWriteBuf()</a>, and <a class="el" href="users_8cpp-source.html#l00031">userrec::userrec()</a>. </td> </tr> </table> <a name="o0" doxytag="connection::fd"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> int <a class="el" href="classconnection.html#o0">connection::fd</a> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> File descriptor of the connection. <p> <p> Definition at line <a class="el" href="connection_8h-source.html#l00301">301</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>. <p> Referenced by <a class="el" href="servers_8cpp-source.html#l00142">serverrec::BeginLink()</a>, <a class="el" href="servers_8cpp-source.html#l00081">serverrec::CreateListener()</a>, <a class="el" href="modules_8cpp-source.html#l00916">ConfigReader::DumpErrors()</a>, <a class="el" href="servers_8cpp-source.html#l00182">serverrec::MeshCookie()</a>, <a class="el" href="modules_8cpp-source.html#l00649">Server::PseudoToUser()</a>, <a class="el" href="users_8cpp-source.html#l00074">userrec::ReadData()</a>, <a class="el" href="modules_8cpp-source.html#l00462">Server::SendTo()</a>, <a class="el" href="servers_8cpp-source.html#l00046">serverrec::serverrec()</a>, <a class="el" href="users_8cpp-source.html#l00031">userrec::userrec()</a>, and <a class="el" href="modules_8cpp-source.html#l00619">Server::UserToPseudo()</a>. </td> </tr> </table> <a name="o7" doxytag="connection::haspassed"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> bool <a class="el" href="classconnection.html#o7">connection::haspassed</a> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> True if server/user has authenticated, false if otherwise. <p> <p> Definition at line <a class="el" href="connection_8h-source.html#l00329">329</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>. <p> Referenced by <a class="el" href="users_8cpp-source.html#l00031">userrec::userrec()</a>. </td> </tr> </table> <a name="o1" doxytag="connection::host"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> char <a class="el" href="classconnection.html#o1">connection::host</a>[160] </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Hostname of connection. <p> Not used if this is a serverrec <p> Definition at line <a class="el" href="connection_8h-source.html#l00305">305</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>. <p> Referenced by <a class="el" href="users_8cpp-source.html#l00084">userrec::GetFullRealHost()</a>, <a class="el" href="modules_8cpp-source.html#l00649">Server::PseudoToUser()</a>, <a class="el" href="users_8cpp-source.html#l00031">userrec::userrec()</a>, and <a class="el" href="modules_8cpp-source.html#l00619">Server::UserToPseudo()</a>. </td> </tr> </table> <a name="o12" doxytag="connection::idle_lastmsg"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> time_t <a class="el" href="classconnection.html#o12">connection::idle_lastmsg</a> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Time that the connection last sent data, used to calculate idle time. <p> <p> Definition at line <a class="el" href="connection_8h-source.html#l00351">351</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>. <p> Referenced by <a class="el" href="users_8cpp-source.html#l00031">userrec::userrec()</a>. </td> </tr> </table> <a name="o2" doxytag="connection::ip"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> char <a class="el" href="classconnection.html#o2">connection::ip</a>[16] </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> IP of connection. <p> <p> Definition at line <a class="el" href="connection_8h-source.html#l00309">309</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>. <p> Referenced by <a class="el" href="users_8cpp-source.html#l00031">userrec::userrec()</a>. </td> </tr> </table> <a name="o10" doxytag="connection::lastping"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> time_t <a class="el" href="classconnection.html#o10">connection::lastping</a> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Time the connection was last pinged. <p> <p> Definition at line <a class="el" href="connection_8h-source.html#l00343">343</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>. <p> Referenced by <a class="el" href="servers_8cpp-source.html#l00046">serverrec::serverrec()</a>, and <a class="el" href="users_8cpp-source.html#l00031">userrec::userrec()</a>. </td> </tr> </table> <a name="o13" doxytag="connection::nping"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> time_t <a class="el" href="classconnection.html#o13">connection::nping</a> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Used by PING checks with clients. <p> <p> Definition at line <a class="el" href="connection_8h-source.html#l00355">355</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>. <p> Referenced by <a class="el" href="users_8cpp-source.html#l00031">userrec::userrec()</a>. </td> </tr> </table> <a name="o8" doxytag="connection::port"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> int <a class="el" href="classconnection.html#o8">connection::port</a> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Port number For a userrec, this is the port they connected to the network on. <p> For a serverrec this is the current listening port of the serverrec object. <p> Definition at line <a class="el" href="connection_8h-source.html#l00335">335</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>. <p> Referenced by <a class="el" href="servers_8cpp-source.html#l00081">serverrec::CreateListener()</a>, and <a class="el" href="users_8cpp-source.html#l00031">userrec::userrec()</a>. </td> </tr> </table> <a name="o9" doxytag="connection::registered"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> char <a class="el" href="classconnection.html#o9">connection::registered</a> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Used by userrec to indicate the registration status of the connection. <p> <p> Definition at line <a class="el" href="connection_8h-source.html#l00339">339</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>. <p> Referenced by <a class="el" href="users_8cpp-source.html#l00031">userrec::userrec()</a>. </td> </tr> </table> <a name="o11" doxytag="connection::signon"></a><p> <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> time_t <a class="el" href="classconnection.html#o11">connection::signon</a> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Time the connection was created, set in the constructor. <p> <p> Definition at line <a class="el" href="connection_8h-source.html#l00347">347</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>. <p> Referenced by <a class="el" href="servers_8cpp-source.html#l00046">serverrec::serverrec()</a>, and <a class="el" href="users_8cpp-source.html#l00031">userrec::userrec()</a>. </td> </tr> </table> <hr>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="connection_8h-source.html">connection.h</a></ul> <hr size="1"><address style="align: right;"><small>Generated on Wed May 25 22:02:56 2005 for InspIRCd by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0 > </a>1.3.3 </small></address> </body> </html>