1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3 <title>InspIRCd: connection Class Reference</title>
4 <link href="inspircd.doxygen.css" rel="stylesheet" type="text/css">
6 <!-- Generated by Doxygen 1.4.4-20050815 -->
7 <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>
8 <h1>connection Class Reference</h1><!-- doxytag: class="connection" --><!-- doxytag: inherits="Extensible" -->Please note: classes serverrec and userrec both inherit from class connection.
9 <a href="#_details">More...</a>
11 <code>#include <<a class="el" href="connection_8h-source.html">connection.h</a>></code>
13 Inheritance diagram for connection:<p><center><img src="classconnection__inherit__graph.gif" border="0" usemap="#connection__inherit__map" alt="Inheritance graph"></center>
14 <map name="connection__inherit__map">
15 <area href="classuserrec.html" shape="rect" coords="16,231,83,257" alt="">
16 <area href="classExtensible.html" shape="rect" coords="8,81,91,108" alt="">
17 <area href="classclassbase.html" shape="rect" coords="10,7,90,33" alt="">
19 <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>
20 <map name="connection__coll__map">
21 <area href="classExtensible.html" shape="rect" coords="86,236,168,263" alt="">
22 <area href="classclassbase.html" shape="rect" coords="68,97,148,124" alt="">
24 <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">
26 <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
27 <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>
29 <tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <a href="#connection_28_29"></a><br></td></tr>
30 <tr><td colspan="2"><br><h2>Public Attributes</h2></td></tr>
31 <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>
33 <tr><td class="mdescLeft"> </td><td class="mdescRight">File descriptor of the connection. <a href="#fd"></a><br></td></tr>
34 <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>
36 <tr><td class="mdescLeft"> </td><td class="mdescRight">Hostname of connection. <a href="#host_5B_31_36_30_5D"></a><br></td></tr>
37 <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>
39 <tr><td class="mdescLeft"> </td><td class="mdescRight">IP of connection. <a href="#ip_5B_31_36_5D"></a><br></td></tr>
40 <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>
42 <tr><td class="mdescLeft"> </td><td class="mdescRight">Stats counter for bytes inbound. <a href="#bytes_5Fin"></a><br></td></tr>
43 <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>
45 <tr><td class="mdescLeft"> </td><td class="mdescRight">Stats counter for bytes outbound. <a href="#bytes_5Fout"></a><br></td></tr>
46 <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>
48 <tr><td class="mdescLeft"> </td><td class="mdescRight">Stats counter for commands inbound. <a href="#cmds_5Fin"></a><br></td></tr>
49 <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>
51 <tr><td class="mdescLeft"> </td><td class="mdescRight">Stats counter for commands outbound. <a href="#cmds_5Fout"></a><br></td></tr>
52 <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>
54 <tr><td class="mdescLeft"> </td><td class="mdescRight">True if server/user has authenticated, false if otherwise. <a href="#haspassed"></a><br></td></tr>
55 <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>
57 <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>
58 <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>
60 <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>
61 <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>
63 <tr><td class="mdescLeft"> </td><td class="mdescRight">Time the connection was last pinged. <a href="#lastping"></a><br></td></tr>
64 <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>
66 <tr><td class="mdescLeft"> </td><td class="mdescRight">Time the connection was created, set in the constructor. <a href="#signon"></a><br></td></tr>
67 <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>
69 <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>
70 <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>
72 <tr><td class="mdescLeft"> </td><td class="mdescRight">Used by PING checks with clients. <a href="#nping"></a><br></td></tr>
74 <hr><a name="_details"></a><h2>Detailed Description</h2>
75 Please note: classes serverrec and userrec both inherit from class connection.
79 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>
80 <a class="anchor" name="connection_28_29"></a><!-- doxytag: member="connection::connection" ref="connection_28_29" args="()" --><p>
81 <table class="mdTable" cellpadding="2" cellspacing="0">
84 <table cellpadding="0" cellspacing="0" border="0">
86 <td class="md" nowrap valign="top">connection::connection </td>
87 <td class="md" valign="top">( </td>
88 <td class="mdname1" valign="top" nowrap> </td>
89 <td class="md" valign="top"> ) </td>
90 <td class="md" nowrap><code> [inline]</code></td>
96 <table cellspacing="5" cellpadding="0" border="0">
108 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>.
110 References <a class="el" href="connection_8h-source.html#l00042">fd</a>.<div class="fragment"><pre class="fragment"><a name="l00101"></a>00101 {
111 <a name="l00102"></a>00102 this-><a class="code" href="classconnection.html#fd">fd</a> = -1;
112 <a name="l00103"></a>00103 }
118 <hr><h2>Member Data Documentation</h2>
119 <a class="anchor" name="bytes_5Fin"></a><!-- doxytag: member="connection::bytes_in" ref="bytes_5Fin" args="" --><p>
120 <table class="mdTable" cellpadding="2" cellspacing="0">
123 <table cellpadding="0" cellspacing="0" border="0">
125 <td class="md" nowrap valign="top">int <a class="el" href="classconnection.html#bytes_5Fin">connection::bytes_in</a> </td>
131 <table cellspacing="5" cellpadding="0" border="0">
139 Stats counter for bytes inbound.
143 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>.
145 Referenced by <a class="el" href="users_8cpp-source.html#l00063">userrec::userrec()</a>. </td>
148 <a class="anchor" name="bytes_5Fout"></a><!-- doxytag: member="connection::bytes_out" ref="bytes_5Fout" args="" --><p>
149 <table class="mdTable" cellpadding="2" cellspacing="0">
152 <table cellpadding="0" cellspacing="0" border="0">
154 <td class="md" nowrap valign="top">int <a class="el" href="classconnection.html#bytes_5Fout">connection::bytes_out</a> </td>
160 <table cellspacing="5" cellpadding="0" border="0">
168 Stats counter for bytes outbound.
172 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>.
174 Referenced by <a class="el" href="users_8cpp-source.html#l00295">userrec::FlushWriteBuf()</a>, and <a class="el" href="users_8cpp-source.html#l00063">userrec::userrec()</a>. </td>
177 <a class="anchor" name="cmds_5Fin"></a><!-- doxytag: member="connection::cmds_in" ref="cmds_5Fin" args="" --><p>
178 <table class="mdTable" cellpadding="2" cellspacing="0">
181 <table cellpadding="0" cellspacing="0" border="0">
183 <td class="md" nowrap valign="top">int <a class="el" href="classconnection.html#cmds_5Fin">connection::cmds_in</a> </td>
189 <table cellspacing="5" cellpadding="0" border="0">
197 Stats counter for commands inbound.
201 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>.
203 Referenced by <a class="el" href="users_8cpp-source.html#l00063">userrec::userrec()</a>. </td>
206 <a class="anchor" name="cmds_5Fout"></a><!-- doxytag: member="connection::cmds_out" ref="cmds_5Fout" args="" --><p>
207 <table class="mdTable" cellpadding="2" cellspacing="0">
210 <table cellpadding="0" cellspacing="0" border="0">
212 <td class="md" nowrap valign="top">int <a class="el" href="classconnection.html#cmds_5Fout">connection::cmds_out</a> </td>
218 <table cellspacing="5" cellpadding="0" border="0">
226 Stats counter for commands outbound.
230 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>.
232 Referenced by <a class="el" href="users_8cpp-source.html#l00295">userrec::FlushWriteBuf()</a>, and <a class="el" href="users_8cpp-source.html#l00063">userrec::userrec()</a>. </td>
235 <a class="anchor" name="fd"></a><!-- doxytag: member="connection::fd" ref="fd" args="" --><p>
236 <table class="mdTable" cellpadding="2" cellspacing="0">
239 <table cellpadding="0" cellspacing="0" border="0">
241 <td class="md" nowrap valign="top">int <a class="el" href="classconnection.html#fd">connection::fd</a> </td>
247 <table cellspacing="5" cellpadding="0" border="0">
255 File descriptor of the connection.
259 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>.
261 Referenced by <a class="el" href="channels_8cpp-source.html#l00194">add_channel()</a>, <a class="el" href="connection_8h-source.html#l00100">connection()</a>, <a class="el" href="modules_8cpp-source.html#l00834">ConfigReader::DumpErrors()</a>, <a class="el" href="users_8cpp-source.html#l00647">FullConnectUser()</a>, <a class="el" href="channels_8cpp-source.html#l00459">kick_channel()</a>, <a class="el" href="users_8cpp-source.html#l00349">kill_link()</a>, <a class="el" href="users_8cpp-source.html#l00412">kill_link_silent()</a>, <a class="el" href="modules_8cpp-source.html#l00609">Server::PseudoToUser()</a>, <a class="el" href="modules_8cpp-source.html#l00440">Server::SendTo()</a>, <a class="el" href="users_8cpp-source.html#l00063">userrec::userrec()</a>, and <a class="el" href="modules_8cpp-source.html#l00597">Server::UserToPseudo()</a>. </td>
264 <a class="anchor" name="haspassed"></a><!-- doxytag: member="connection::haspassed" ref="haspassed" args="" --><p>
265 <table class="mdTable" cellpadding="2" cellspacing="0">
268 <table cellpadding="0" cellspacing="0" border="0">
270 <td class="md" nowrap valign="top">bool <a class="el" href="classconnection.html#haspassed">connection::haspassed</a> </td>
276 <table cellspacing="5" cellpadding="0" border="0">
284 True if server/user has authenticated, false if otherwise.
288 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>.
290 Referenced by <a class="el" href="users_8cpp-source.html#l00647">FullConnectUser()</a>, and <a class="el" href="users_8cpp-source.html#l00063">userrec::userrec()</a>. </td>
293 <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>
294 <table class="mdTable" cellpadding="2" cellspacing="0">
297 <table cellpadding="0" cellspacing="0" border="0">
299 <td class="md" nowrap valign="top">char <a class="el" href="classconnection.html#host_5B_31_36_30_5D">connection::host</a>[160] </td>
305 <table cellspacing="5" cellpadding="0" border="0">
313 Hostname of connection.
315 Not used if this is a serverrec
317 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>.
319 Referenced by <a class="el" href="users_8cpp-source.html#l00471">AddWhoWas()</a>, <a class="el" href="users_8cpp-source.html#l00647">FullConnectUser()</a>, <a class="el" href="users_8cpp-source.html#l00116">userrec::GetFullRealHost()</a>, <a class="el" href="users_8cpp-source.html#l00349">kill_link()</a>, <a class="el" href="users_8cpp-source.html#l00412">kill_link_silent()</a>, <a class="el" href="modules_8cpp-source.html#l00609">Server::PseudoToUser()</a>, <a class="el" href="users_8cpp-source.html#l00063">userrec::userrec()</a>, and <a class="el" href="modules_8cpp-source.html#l00597">Server::UserToPseudo()</a>. </td>
322 <a class="anchor" name="idle_5Flastmsg"></a><!-- doxytag: member="connection::idle_lastmsg" ref="idle_5Flastmsg" args="" --><p>
323 <table class="mdTable" cellpadding="2" cellspacing="0">
326 <table cellpadding="0" cellspacing="0" border="0">
328 <td class="md" nowrap valign="top">time_t <a class="el" href="classconnection.html#idle_5Flastmsg">connection::idle_lastmsg</a> </td>
334 <table cellspacing="5" cellpadding="0" border="0">
342 Time that the connection last sent data, used to calculate idle time.
346 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>.
348 Referenced by <a class="el" href="users_8cpp-source.html#l00647">FullConnectUser()</a>, and <a class="el" href="users_8cpp-source.html#l00063">userrec::userrec()</a>. </td>
351 <a class="anchor" name="ip_5B_31_36_5D"></a><!-- doxytag: member="connection::ip" ref="ip_5B_31_36_5D" args="[16]" --><p>
352 <table class="mdTable" cellpadding="2" cellspacing="0">
355 <table cellpadding="0" cellspacing="0" border="0">
357 <td class="md" nowrap valign="top">char <a class="el" href="classconnection.html#ip_5B_31_36_5D">connection::ip</a>[16] </td>
363 <table cellspacing="5" cellpadding="0" border="0">
375 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>.
377 Referenced by <a class="el" href="users_8cpp-source.html#l00647">FullConnectUser()</a>, and <a class="el" href="users_8cpp-source.html#l00063">userrec::userrec()</a>. </td>
380 <a class="anchor" name="lastping"></a><!-- doxytag: member="connection::lastping" ref="lastping" args="" --><p>
381 <table class="mdTable" cellpadding="2" cellspacing="0">
384 <table cellpadding="0" cellspacing="0" border="0">
386 <td class="md" nowrap valign="top">time_t <a class="el" href="classconnection.html#lastping">connection::lastping</a> </td>
392 <table cellspacing="5" cellpadding="0" border="0">
400 Time the connection was last pinged.
404 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>.
406 Referenced by <a class="el" href="users_8cpp-source.html#l00063">userrec::userrec()</a>. </td>
409 <a class="anchor" name="nping"></a><!-- doxytag: member="connection::nping" ref="nping" args="" --><p>
410 <table class="mdTable" cellpadding="2" cellspacing="0">
413 <table cellpadding="0" cellspacing="0" border="0">
415 <td class="md" nowrap valign="top">time_t <a class="el" href="classconnection.html#nping">connection::nping</a> </td>
421 <table cellspacing="5" cellpadding="0" border="0">
429 Used by PING checks with clients.
433 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>.
435 Referenced by <a class="el" href="users_8cpp-source.html#l00063">userrec::userrec()</a>. </td>
438 <a class="anchor" name="port"></a><!-- doxytag: member="connection::port" ref="port" args="" --><p>
439 <table class="mdTable" cellpadding="2" cellspacing="0">
442 <table cellpadding="0" cellspacing="0" border="0">
444 <td class="md" nowrap valign="top">int <a class="el" href="classconnection.html#port">connection::port</a> </td>
450 <table cellspacing="5" cellpadding="0" border="0">
458 Port number For a userrec, this is the port they connected to the network on.
460 For a serverrec this is the current listening port of the serverrec object.
462 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>.
464 Referenced by <a class="el" href="users_8cpp-source.html#l00647">FullConnectUser()</a>, <a class="el" href="users_8cpp-source.html#l00349">kill_link()</a>, <a class="el" href="users_8cpp-source.html#l00412">kill_link_silent()</a>, and <a class="el" href="users_8cpp-source.html#l00063">userrec::userrec()</a>. </td>
467 <a class="anchor" name="registered"></a><!-- doxytag: member="connection::registered" ref="registered" args="" --><p>
468 <table class="mdTable" cellpadding="2" cellspacing="0">
471 <table cellpadding="0" cellspacing="0" border="0">
473 <td class="md" nowrap valign="top">char <a class="el" href="classconnection.html#registered">connection::registered</a> </td>
479 <table cellspacing="5" cellpadding="0" border="0">
487 Used by userrec to indicate the registration status of the connection.
491 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>.
493 Referenced by <a class="el" href="users_8cpp-source.html#l00731">ConnectUser()</a>, <a class="el" href="users_8cpp-source.html#l00769">force_nickchange()</a>, <a class="el" href="users_8cpp-source.html#l00647">FullConnectUser()</a>, <a class="el" href="users_8cpp-source.html#l00349">kill_link()</a>, <a class="el" href="users_8cpp-source.html#l00412">kill_link_silent()</a>, and <a class="el" href="users_8cpp-source.html#l00063">userrec::userrec()</a>. </td>
496 <a class="anchor" name="signon"></a><!-- doxytag: member="connection::signon" ref="signon" args="" --><p>
497 <table class="mdTable" cellpadding="2" cellspacing="0">
500 <table cellpadding="0" cellspacing="0" border="0">
502 <td class="md" nowrap valign="top">time_t <a class="el" href="classconnection.html#signon">connection::signon</a> </td>
508 <table cellspacing="5" cellpadding="0" border="0">
516 Time the connection was created, set in the constructor.
520 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>.
522 Referenced by <a class="el" href="users_8cpp-source.html#l00471">AddWhoWas()</a>, and <a class="el" href="users_8cpp-source.html#l00063">userrec::userrec()</a>. </td>
525 <hr>The documentation for this class was generated from the following file:<ul>
526 <li><a class="el" href="connection_8h-source.html">connection.h</a></ul>
527 <hr size="1"><address style="align: right;"><small>Generated on Mon Dec 19 18:02:15 2005 for InspIRCd by
528 <a href="http://www.doxygen.org/index.html">
529 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4-20050815 </small></address>