<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 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.4.4-20050815 --> <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">Class List</a> | <a class="qindex" href="dirs.html">Directories</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">Class Members</a> | <a class="qindex" href="globals.html">File Members</a></div> <h1>connection Class Reference</h1><!-- doxytag: class="connection" --><!-- doxytag: inherits="Extensible" -->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="classuserrec.html" shape="rect" coords="16,231,83,257" alt=""> <area href="classExtensible.html" shape="rect" coords="8,81,91,108" alt=""> <area href="classclassbase.html" shape="rect" coords="10,7,90,33" 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,236,168,263" alt=""> <area href="classclassbase.html" shape="rect" coords="68,97,148,124" 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#connection_28_29">connection</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <a href="#connection_28_29"></a><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#fd">fd</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">File descriptor of the connection. <a href="#fd"></a><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#host_5B_31_36_30_5D">host</a> [160]</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Hostname of connection. <a href="#host_5B_31_36_30_5D"></a><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#ip_5B_31_36_5D">ip</a> [16]</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">IP of connection. <a href="#ip_5B_31_36_5D"></a><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#bytes_5Fin">bytes_in</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Stats counter for bytes inbound. <a href="#bytes_5Fin"></a><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#bytes_5Fout">bytes_out</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Stats counter for bytes outbound. <a href="#bytes_5Fout"></a><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#cmds_5Fin">cmds_in</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Stats counter for commands inbound. <a href="#cmds_5Fin"></a><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#cmds_5Fout">cmds_out</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Stats counter for commands outbound. <a href="#cmds_5Fout"></a><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#haspassed">haspassed</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">True if server/user has authenticated, false if otherwise. <a href="#haspassed"></a><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#port">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. <a href="#port"></a><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#registered">registered</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Used by userrec to indicate the registration status of the connection. <a href="#registered"></a><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#lastping">lastping</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Time the connection was last pinged. <a href="#lastping"></a><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#signon">signon</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Time the connection was created, set in the constructor. <a href="#signon"></a><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#idle_5Flastmsg">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. <a href="#idle_5Flastmsg"></a><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#nping">nping</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Used by PING checks with clients. <a href="#nping"></a><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#l00037">37</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>.<hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="connection_28_29"></a><!-- doxytag: member="connection::connection" ref="connection_28_29" args="()" --><p> <table class="mdTable" 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><code> [inline]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Default constructor. <p> <p> Definition at line <a class="el" href="connection_8h-source.html#l00100">100</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>. <p> References <a class="el" href="connection_8h-source.html#l00042">fd</a>.<div class="fragment"><pre class="fragment"><a name="l00101"></a>00101 { <a name="l00102"></a>00102 this-><a class="code" href="classconnection.html#fd">fd</a> = -1; <a name="l00103"></a>00103 } </pre></div> <p> </td> </tr> </table> <hr><h2>Member Data Documentation</h2> <a class="anchor" name="bytes_5Fin"></a><!-- doxytag: member="connection::bytes_in" ref="bytes_5Fin" args="" --><p> <table class="mdTable" 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#bytes_5Fin">connection::bytes_in</a> </td> </tr> </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#l00054">54</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#l00033">userrec::userrec()</a>. </td> </tr> </table> <a class="anchor" name="bytes_5Fout"></a><!-- doxytag: member="connection::bytes_out" ref="bytes_5Fout" args="" --><p> <table class="mdTable" 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#bytes_5Fout">connection::bytes_out</a> </td> </tr> </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#l00058">58</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#l00266">userrec::FlushWriteBuf()</a>, and <a class="el" href="users_8cpp-source.html#l00033">userrec::userrec()</a>. </td> </tr> </table> <a class="anchor" name="cmds_5Fin"></a><!-- doxytag: member="connection::cmds_in" ref="cmds_5Fin" args="" --><p> <table class="mdTable" 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#cmds_5Fin">connection::cmds_in</a> </td> </tr> </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#l00062">62</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#l00033">userrec::userrec()</a>. </td> </tr> </table> <a class="anchor" name="cmds_5Fout"></a><!-- doxytag: member="connection::cmds_out" ref="cmds_5Fout" args="" --><p> <table class="mdTable" 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#cmds_5Fout">connection::cmds_out</a> </td> </tr> </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#l00066">66</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#l00266">userrec::FlushWriteBuf()</a>, and <a class="el" href="users_8cpp-source.html#l00033">userrec::userrec()</a>. </td> </tr> </table> <a class="anchor" name="fd"></a><!-- doxytag: member="connection::fd" ref="fd" args="" --><p> <table class="mdTable" 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#fd">connection::fd</a> </td> </tr> </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#l00042">42</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>. <p> Referenced by <a class="el" href="connection_8h-source.html#l00100">connection()</a>, <a class="el" href="modules_8cpp-source.html#l00894">ConfigReader::DumpErrors()</a>, <a class="el" href="modules_8cpp-source.html#l00670">Server::PseudoToUser()</a>, <a class="el" href="modules_8cpp-source.html#l00482">Server::SendTo()</a>, <a class="el" href="users_8cpp-source.html#l00033">userrec::userrec()</a>, and <a class="el" href="modules_8cpp-source.html#l00639">Server::UserToPseudo()</a>. </td> </tr> </table> <a class="anchor" name="haspassed"></a><!-- doxytag: member="connection::haspassed" ref="haspassed" args="" --><p> <table class="mdTable" 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#haspassed">connection::haspassed</a> </td> </tr> </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#l00070">70</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#l00033">userrec::userrec()</a>. </td> </tr> </table> <a class="anchor" name="host_5B_31_36_30_5D"></a><!-- doxytag: member="connection::host" ref="host_5B_31_36_30_5D" args="[160]" --><p> <table class="mdTable" 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#host_5B_31_36_30_5D">connection::host</a>[160] </td> </tr> </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#l00046">46</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#l00087">userrec::GetFullRealHost()</a>, <a class="el" href="modules_8cpp-source.html#l00670">Server::PseudoToUser()</a>, <a class="el" href="users_8cpp-source.html#l00033">userrec::userrec()</a>, and <a class="el" href="modules_8cpp-source.html#l00639">Server::UserToPseudo()</a>. </td> </tr> </table> <a class="anchor" name="idle_5Flastmsg"></a><!-- doxytag: member="connection::idle_lastmsg" ref="idle_5Flastmsg" args="" --><p> <table class="mdTable" 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#idle_5Flastmsg">connection::idle_lastmsg</a> </td> </tr> </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#l00092">92</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#l00033">userrec::userrec()</a>. </td> </tr> </table> <a class="anchor" name="ip_5B_31_36_5D"></a><!-- doxytag: member="connection::ip" ref="ip_5B_31_36_5D" args="[16]" --><p> <table class="mdTable" 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#ip_5B_31_36_5D">connection::ip</a>[16] </td> </tr> </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#l00050">50</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#l00033">userrec::userrec()</a>. </td> </tr> </table> <a class="anchor" name="lastping"></a><!-- doxytag: member="connection::lastping" ref="lastping" args="" --><p> <table class="mdTable" 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#lastping">connection::lastping</a> </td> </tr> </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#l00084">84</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#l00033">userrec::userrec()</a>. </td> </tr> </table> <a class="anchor" name="nping"></a><!-- doxytag: member="connection::nping" ref="nping" args="" --><p> <table class="mdTable" 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#nping">connection::nping</a> </td> </tr> </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#l00096">96</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#l00033">userrec::userrec()</a>. </td> </tr> </table> <a class="anchor" name="port"></a><!-- doxytag: member="connection::port" ref="port" args="" --><p> <table class="mdTable" 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#port">connection::port</a> </td> </tr> </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#l00076">76</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#l00033">userrec::userrec()</a>. </td> </tr> </table> <a class="anchor" name="registered"></a><!-- doxytag: member="connection::registered" ref="registered" args="" --><p> <table class="mdTable" 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#registered">connection::registered</a> </td> </tr> </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#l00080">80</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#l00033">userrec::userrec()</a>. </td> </tr> </table> <a class="anchor" name="signon"></a><!-- doxytag: member="connection::signon" ref="signon" args="" --><p> <table class="mdTable" 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#signon">connection::signon</a> </td> </tr> </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#l00088">88</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#l00033">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 Sun Nov 27 01:43:25 2005 for InspIRCd by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4-20050815 </small></address> </body> </html>