]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - docs/module-doc/classconnection.html
Added final documentation for inspircd Beta 4
[user/henk/code/inspircd.git] / docs / module-doc / classconnection.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 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.css" rel="stylesheet" type="text/css">
5 </head><body>
6 <!-- Generated by Doxygen 1.3.3 -->
7 <div class="qindex"><a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Compound&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Compound&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
8 <h1>connection Class Reference</h1>Please note: classes serverrec and userrec both inherit from class connection.  
9 <a href="#_details">More...</a>
10 <p>
11 <code>#include &lt;<a class="el" href="connection_8h-source.html">connection.h</a>&gt;</code>
12 <p>
13 Inherits <a class="el" href="classExtensible.html">Extensible</a>.
14 <p>
15 Inherited by <a class="el" href="classserverrec.html">serverrec</a>, and <a class="el" href="classuserrec.html">userrec</a>.
16 <p>
17 <a href="classconnection-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
18 <tr><td></td></tr>
19 <tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
20 <tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#a0">connection</a> ()</td></tr>
21
22 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default constructor. </em> <a href="#a0"></a><em><br><br></td></tr>
23 <tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#a1">CreateListener</a> (char *<a class="el" href="classconnection.html#o1">host</a>, int p)</td></tr>
24
25 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a listening socket on 'host' using port number 'p'. </em> <a href="#a1"></a><em><br><br></td></tr>
26 <tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#a2">BeginLink</a> (char *targethost, int <a class="el" href="classconnection.html#o9">port</a>, char *password, char *servername, int myport)</td></tr>
27
28 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Begin an outbound link to another ircd at targethost. </em> <a href="#a2"></a><em><br><br></td></tr>
29 <tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#a3">MeshCookie</a> (char *targethost, int <a class="el" href="classconnection.html#o9">port</a>, unsigned long cookie, char *servername)</td></tr>
30
31 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Begin an outbound mesh link to another ircd on a network you are already an authenticated member of. </em> <a href="#a3"></a><em><br><br></td></tr>
32 <tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#a4">TerminateLink</a> (char *targethost)</td></tr>
33
34 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Terminate a link to 'targethost' by calling the <a class="el" href="classircd__connector.html#a13">ircd_connector::CloseConnection</a> method. </em> <a href="#a4"></a><em><br><br></td></tr>
35 <tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#a5">SendPacket</a> (char *message, const char *<a class="el" href="classconnection.html#o1">host</a>)</td></tr>
36
37 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Send a message to a server by name, if the server is unavailable directly route the packet via another server If the server still cannot be reached after attempting to route the message remotely, returns false. </em> <a href="#a5"></a><em><br><br></td></tr>
38 <tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#a6">RecvPacket</a> (std::deque&lt; std::string &gt; &amp;messages, char *<a class="el" href="classconnection.html#o1">host</a>)</td></tr>
39
40 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the next available packet and returns true if data is available. </em> <a href="#a6"></a><em><br><br></td></tr>
41 <tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classircd__connector.html">ircd_connector</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#a7">FindHost</a> (std::string <a class="el" href="classconnection.html#o1">host</a>)</td></tr>
42
43 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Find the <a class="el" href="classircd__connector.html">ircd_connector</a> oject related to a certain servername given in 'host'. </em> <a href="#a7"></a><em><br><br></td></tr>
44 <tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#a8">AddIncoming</a> (int <a class="el" href="classconnection.html#o0">fd</a>, char *targethost, int sourceport)</td></tr>
45
46 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add an incoming connection to the connection pool. </em> <a href="#a8"></a><em><br><br></td></tr>
47 <tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>
48 <tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#o0">fd</a></td></tr>
49
50 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">File descriptor of the connection. </em> <a href="#o0"></a><em><br><br></td></tr>
51 <tr><td class="memItemLeft" nowrap align=right valign=top>char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#o1">host</a> [256]</td></tr>
52
53 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Hostname of connection. </em> <a href="#o1"></a><em><br><br></td></tr>
54 <tr><td class="memItemLeft" nowrap align=right valign=top>char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#o2">ip</a> [32]</td></tr>
55
56 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">IP of connection. </em> <a href="#o2"></a><em><br><br></td></tr>
57 <tr><td class="memItemLeft" nowrap align=right valign=top>char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#o3">inbuf</a> [MAXBUF]</td></tr>
58
59 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Inbuf of connection. </em> <a href="#o3"></a><em><br><br></td></tr>
60 <tr><td class="memItemLeft" nowrap align=right valign=top>long&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#o4">bytes_in</a></td></tr>
61
62 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Stats counter for bytes inbound. </em> <a href="#o4"></a><em><br><br></td></tr>
63 <tr><td class="memItemLeft" nowrap align=right valign=top>long&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#o5">bytes_out</a></td></tr>
64
65 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Stats counter for bytes outbound. </em> <a href="#o5"></a><em><br><br></td></tr>
66 <tr><td class="memItemLeft" nowrap align=right valign=top>long&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#o6">cmds_in</a></td></tr>
67
68 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Stats counter for commands inbound. </em> <a href="#o6"></a><em><br><br></td></tr>
69 <tr><td class="memItemLeft" nowrap align=right valign=top>long&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#o7">cmds_out</a></td></tr>
70
71 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Stats counter for commands outbound. </em> <a href="#o7"></a><em><br><br></td></tr>
72 <tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#o8">haspassed</a></td></tr>
73
74 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">True if server/user has authenticated, false if otherwise. </em> <a href="#o8"></a><em><br><br></td></tr>
75 <tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#o9">port</a></td></tr>
76
77 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Port number For a userrec, this is the port they connected to the network on. </em> <a href="#o9"></a><em><br><br></td></tr>
78 <tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#o10">registered</a></td></tr>
79
80 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Used by userrec to indicate the registration status of the connection. </em> <a href="#o10"></a><em><br><br></td></tr>
81 <tr><td class="memItemLeft" nowrap align=right valign=top>short int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#o11">state</a></td></tr>
82
83 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reserved for future use. </em> <a href="#o11"></a><em><br><br></td></tr>
84 <tr><td class="memItemLeft" nowrap align=right valign=top>time_t&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#o12">lastping</a></td></tr>
85
86 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Time the connection was last pinged. </em> <a href="#o12"></a><em><br><br></td></tr>
87 <tr><td class="memItemLeft" nowrap align=right valign=top>time_t&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#o13">signon</a></td></tr>
88
89 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Time the connection was created, set in the constructor. </em> <a href="#o13"></a><em><br><br></td></tr>
90 <tr><td class="memItemLeft" nowrap align=right valign=top>time_t&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#o14">idle_lastmsg</a></td></tr>
91
92 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Time that the connection last sent data, used to calculate idle time. </em> <a href="#o14"></a><em><br><br></td></tr>
93 <tr><td class="memItemLeft" nowrap align=right valign=top>time_t&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#o15">nping</a></td></tr>
94
95 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Used by PING checks with clients. </em> <a href="#o15"></a><em><br><br></td></tr>
96 <tr><td class="memItemLeft" nowrap align=right valign=top>char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#o16">internal_addr</a> [MAXBUF]</td></tr>
97
98 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Unused, will be removed in a future alpha/beta. </em> <a href="#o16"></a><em><br><br></td></tr>
99 <tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#o17">internal_port</a></td></tr>
100
101 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Unused, will be removed in a future alpha/beta. </em> <a href="#o17"></a><em><br><br></td></tr>
102 <tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="classircd__connector.html">ircd_connector</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classconnection.html#o18">connectors</a></td></tr>
103
104 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">With a serverrec, this is a list of all established server connections. </em> <a href="#o18"></a><em><br><br></td></tr>
105 </table>
106 <hr><a name="_details"></a><h2>Detailed Description</h2>
107 Please note: classes serverrec and userrec both inherit from class connection. 
108 <p>
109
110 <p>
111 Definition at line <a class="el" href="connection_8h-source.html#l00210">210</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2>
112 <a name="a0" doxytag="connection::connection"></a><p>
113 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
114   <tr>
115     <td class="mdRow">
116       <table cellpadding="0" cellspacing="0" border="0">
117         <tr>
118           <td class="md" nowrap valign="top"> connection::connection </td>
119           <td class="md" valign="top">(&nbsp;</td>
120           <td class="mdname1" valign="top" nowrap>          </td>
121           <td class="md" valign="top">&nbsp;)&nbsp;</td>
122           <td class="md" nowrap></td>
123         </tr>
124
125       </table>
126     </td>
127   </tr>
128 </table>
129 <table cellspacing=5 cellpadding=0 border=0>
130   <tr>
131     <td>
132       &nbsp;
133     </td>
134     <td>
135
136 <p>
137 Default constructor. 
138 <p>
139     </td>
140   </tr>
141 </table>
142 <hr><h2>Member Function Documentation</h2>
143 <a name="a8" doxytag="connection::AddIncoming"></a><p>
144 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
145   <tr>
146     <td class="mdRow">
147       <table cellpadding="0" cellspacing="0" border="0">
148         <tr>
149           <td class="md" nowrap valign="top"> bool connection::AddIncoming </td>
150           <td class="md" valign="top">(&nbsp;</td>
151           <td class="md" nowrap valign="top">int&nbsp;</td>
152           <td class="mdname" nowrap> <em>fd</em>, </td>
153         </tr>
154         <tr>
155           <td></td>
156           <td></td>
157           <td class="md" nowrap>char *&nbsp;</td>
158           <td class="mdname" nowrap> <em>targethost</em>, </td>
159         </tr>
160         <tr>
161           <td></td>
162           <td></td>
163           <td class="md" nowrap>int&nbsp;</td>
164           <td class="mdname" nowrap> <em>sourceport</em></td>
165         </tr>
166         <tr>
167           <td></td>
168           <td class="md">)&nbsp;</td>
169           <td class="md" colspan="2"></td>
170         </tr>
171
172       </table>
173     </td>
174   </tr>
175 </table>
176 <table cellspacing=5 cellpadding=0 border=0>
177   <tr>
178     <td>
179       &nbsp;
180     </td>
181     <td>
182
183 <p>
184 Add an incoming connection to the connection pool. 
185 <p>
186 (reserved for core use)    </td>
187   </tr>
188 </table>
189 <a name="a2" doxytag="connection::BeginLink"></a><p>
190 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
191   <tr>
192     <td class="mdRow">
193       <table cellpadding="0" cellspacing="0" border="0">
194         <tr>
195           <td class="md" nowrap valign="top"> bool connection::BeginLink </td>
196           <td class="md" valign="top">(&nbsp;</td>
197           <td class="md" nowrap valign="top">char *&nbsp;</td>
198           <td class="mdname" nowrap> <em>targethost</em>, </td>
199         </tr>
200         <tr>
201           <td></td>
202           <td></td>
203           <td class="md" nowrap>int&nbsp;</td>
204           <td class="mdname" nowrap> <em>port</em>, </td>
205         </tr>
206         <tr>
207           <td></td>
208           <td></td>
209           <td class="md" nowrap>char *&nbsp;</td>
210           <td class="mdname" nowrap> <em>password</em>, </td>
211         </tr>
212         <tr>
213           <td></td>
214           <td></td>
215           <td class="md" nowrap>char *&nbsp;</td>
216           <td class="mdname" nowrap> <em>servername</em>, </td>
217         </tr>
218         <tr>
219           <td></td>
220           <td></td>
221           <td class="md" nowrap>int&nbsp;</td>
222           <td class="mdname" nowrap> <em>myport</em></td>
223         </tr>
224         <tr>
225           <td></td>
226           <td class="md">)&nbsp;</td>
227           <td class="md" colspan="2"></td>
228         </tr>
229
230       </table>
231     </td>
232   </tr>
233 </table>
234 <table cellspacing=5 cellpadding=0 border=0>
235   <tr>
236     <td>
237       &nbsp;
238     </td>
239     <td>
240
241 <p>
242 Begin an outbound link to another ircd at targethost. 
243 <p>
244     </td>
245   </tr>
246 </table>
247 <a name="a1" doxytag="connection::CreateListener"></a><p>
248 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
249   <tr>
250     <td class="mdRow">
251       <table cellpadding="0" cellspacing="0" border="0">
252         <tr>
253           <td class="md" nowrap valign="top"> bool connection::CreateListener </td>
254           <td class="md" valign="top">(&nbsp;</td>
255           <td class="md" nowrap valign="top">char *&nbsp;</td>
256           <td class="mdname" nowrap> <em>host</em>, </td>
257         </tr>
258         <tr>
259           <td></td>
260           <td></td>
261           <td class="md" nowrap>int&nbsp;</td>
262           <td class="mdname" nowrap> <em>p</em></td>
263         </tr>
264         <tr>
265           <td></td>
266           <td class="md">)&nbsp;</td>
267           <td class="md" colspan="2"></td>
268         </tr>
269
270       </table>
271     </td>
272   </tr>
273 </table>
274 <table cellspacing=5 cellpadding=0 border=0>
275   <tr>
276     <td>
277       &nbsp;
278     </td>
279     <td>
280
281 <p>
282 Create a listening socket on 'host' using port number 'p'. 
283 <p>
284     </td>
285   </tr>
286 </table>
287 <a name="a7" doxytag="connection::FindHost"></a><p>
288 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
289   <tr>
290     <td class="mdRow">
291       <table cellpadding="0" cellspacing="0" border="0">
292         <tr>
293           <td class="md" nowrap valign="top"> <a class="el" href="classircd__connector.html">ircd_connector</a>* connection::FindHost </td>
294           <td class="md" valign="top">(&nbsp;</td>
295           <td class="md" nowrap valign="top">std::string&nbsp;</td>
296           <td class="mdname1" valign="top" nowrap> <em>host</em>          </td>
297           <td class="md" valign="top">&nbsp;)&nbsp;</td>
298           <td class="md" nowrap></td>
299         </tr>
300
301       </table>
302     </td>
303   </tr>
304 </table>
305 <table cellspacing=5 cellpadding=0 border=0>
306   <tr>
307     <td>
308       &nbsp;
309     </td>
310     <td>
311
312 <p>
313 Find the <a class="el" href="classircd__connector.html">ircd_connector</a> oject related to a certain servername given in 'host'. 
314 <p>
315     </td>
316   </tr>
317 </table>
318 <a name="a3" doxytag="connection::MeshCookie"></a><p>
319 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
320   <tr>
321     <td class="mdRow">
322       <table cellpadding="0" cellspacing="0" border="0">
323         <tr>
324           <td class="md" nowrap valign="top"> bool connection::MeshCookie </td>
325           <td class="md" valign="top">(&nbsp;</td>
326           <td class="md" nowrap valign="top">char *&nbsp;</td>
327           <td class="mdname" nowrap> <em>targethost</em>, </td>
328         </tr>
329         <tr>
330           <td></td>
331           <td></td>
332           <td class="md" nowrap>int&nbsp;</td>
333           <td class="mdname" nowrap> <em>port</em>, </td>
334         </tr>
335         <tr>
336           <td></td>
337           <td></td>
338           <td class="md" nowrap>unsigned long&nbsp;</td>
339           <td class="mdname" nowrap> <em>cookie</em>, </td>
340         </tr>
341         <tr>
342           <td></td>
343           <td></td>
344           <td class="md" nowrap>char *&nbsp;</td>
345           <td class="mdname" nowrap> <em>servername</em></td>
346         </tr>
347         <tr>
348           <td></td>
349           <td class="md">)&nbsp;</td>
350           <td class="md" colspan="2"></td>
351         </tr>
352
353       </table>
354     </td>
355   </tr>
356 </table>
357 <table cellspacing=5 cellpadding=0 border=0>
358   <tr>
359     <td>
360       &nbsp;
361     </td>
362     <td>
363
364 <p>
365 Begin an outbound mesh link to another ircd on a network you are already an authenticated member of. 
366 <p>
367     </td>
368   </tr>
369 </table>
370 <a name="a6" doxytag="connection::RecvPacket"></a><p>
371 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
372   <tr>
373     <td class="mdRow">
374       <table cellpadding="0" cellspacing="0" border="0">
375         <tr>
376           <td class="md" nowrap valign="top"> bool connection::RecvPacket </td>
377           <td class="md" valign="top">(&nbsp;</td>
378           <td class="md" nowrap valign="top">std::deque&lt; std::string &gt; &amp;&nbsp;</td>
379           <td class="mdname" nowrap> <em>messages</em>, </td>
380         </tr>
381         <tr>
382           <td></td>
383           <td></td>
384           <td class="md" nowrap>char *&nbsp;</td>
385           <td class="mdname" nowrap> <em>host</em></td>
386         </tr>
387         <tr>
388           <td></td>
389           <td class="md">)&nbsp;</td>
390           <td class="md" colspan="2"></td>
391         </tr>
392
393       </table>
394     </td>
395   </tr>
396 </table>
397 <table cellspacing=5 cellpadding=0 border=0>
398   <tr>
399     <td>
400       &nbsp;
401     </td>
402     <td>
403
404 <p>
405 Returns the next available packet and returns true if data is available. 
406 <p>
407 Writes the servername the data came from to 'host'. If no data is available this function returns false. This function will automatically close broken links and reroute pathways, generating split messages on the network.    </td>
408   </tr>
409 </table>
410 <a name="a5" doxytag="connection::SendPacket"></a><p>
411 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
412   <tr>
413     <td class="mdRow">
414       <table cellpadding="0" cellspacing="0" border="0">
415         <tr>
416           <td class="md" nowrap valign="top"> bool connection::SendPacket </td>
417           <td class="md" valign="top">(&nbsp;</td>
418           <td class="md" nowrap valign="top">char *&nbsp;</td>
419           <td class="mdname" nowrap> <em>message</em>, </td>
420         </tr>
421         <tr>
422           <td></td>
423           <td></td>
424           <td class="md" nowrap>const char *&nbsp;</td>
425           <td class="mdname" nowrap> <em>host</em></td>
426         </tr>
427         <tr>
428           <td></td>
429           <td class="md">)&nbsp;</td>
430           <td class="md" colspan="2"></td>
431         </tr>
432
433       </table>
434     </td>
435   </tr>
436 </table>
437 <table cellspacing=5 cellpadding=0 border=0>
438   <tr>
439     <td>
440       &nbsp;
441     </td>
442     <td>
443
444 <p>
445 Send a message to a server by name, if the server is unavailable directly route the packet via another server If the server still cannot be reached after attempting to route the message remotely, returns false. 
446 <p>
447     </td>
448   </tr>
449 </table>
450 <a name="a4" doxytag="connection::TerminateLink"></a><p>
451 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
452   <tr>
453     <td class="mdRow">
454       <table cellpadding="0" cellspacing="0" border="0">
455         <tr>
456           <td class="md" nowrap valign="top"> void connection::TerminateLink </td>
457           <td class="md" valign="top">(&nbsp;</td>
458           <td class="md" nowrap valign="top">char *&nbsp;</td>
459           <td class="mdname1" valign="top" nowrap> <em>targethost</em>          </td>
460           <td class="md" valign="top">&nbsp;)&nbsp;</td>
461           <td class="md" nowrap></td>
462         </tr>
463
464       </table>
465     </td>
466   </tr>
467 </table>
468 <table cellspacing=5 cellpadding=0 border=0>
469   <tr>
470     <td>
471       &nbsp;
472     </td>
473     <td>
474
475 <p>
476 Terminate a link to 'targethost' by calling the <a class="el" href="classircd__connector.html#a13">ircd_connector::CloseConnection</a> method. 
477 <p>
478     </td>
479   </tr>
480 </table>
481 <hr><h2>Member Data Documentation</h2>
482 <a name="o4" doxytag="connection::bytes_in"></a><p>
483 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
484   <tr>
485     <td class="mdRow">
486       <table cellpadding="0" cellspacing="0" border="0">
487         <tr>
488           <td class="md" nowrap valign="top"> long <a class="el" href="classconnection.html#o4">connection::bytes_in</a>
489       </table>
490     </td>
491   </tr>
492 </table>
493 <table cellspacing=5 cellpadding=0 border=0>
494   <tr>
495     <td>
496       &nbsp;
497     </td>
498     <td>
499
500 <p>
501 Stats counter for bytes inbound. 
502 <p>
503
504 <p>
505 Definition at line <a class="el" href="connection_8h-source.html#l00231">231</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>.
506 <p>
507 Referenced by <a class="el" href="users_8cpp-source.html#l00028">userrec::userrec()</a>.    </td>
508   </tr>
509 </table>
510 <a name="o5" doxytag="connection::bytes_out"></a><p>
511 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
512   <tr>
513     <td class="mdRow">
514       <table cellpadding="0" cellspacing="0" border="0">
515         <tr>
516           <td class="md" nowrap valign="top"> long <a class="el" href="classconnection.html#o5">connection::bytes_out</a>
517       </table>
518     </td>
519   </tr>
520 </table>
521 <table cellspacing=5 cellpadding=0 border=0>
522   <tr>
523     <td>
524       &nbsp;
525     </td>
526     <td>
527
528 <p>
529 Stats counter for bytes outbound. 
530 <p>
531
532 <p>
533 Definition at line <a class="el" href="connection_8h-source.html#l00235">235</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>.
534 <p>
535 Referenced by <a class="el" href="users_8cpp-source.html#l00028">userrec::userrec()</a>.    </td>
536   </tr>
537 </table>
538 <a name="o6" doxytag="connection::cmds_in"></a><p>
539 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
540   <tr>
541     <td class="mdRow">
542       <table cellpadding="0" cellspacing="0" border="0">
543         <tr>
544           <td class="md" nowrap valign="top"> long <a class="el" href="classconnection.html#o6">connection::cmds_in</a>
545       </table>
546     </td>
547   </tr>
548 </table>
549 <table cellspacing=5 cellpadding=0 border=0>
550   <tr>
551     <td>
552       &nbsp;
553     </td>
554     <td>
555
556 <p>
557 Stats counter for commands inbound. 
558 <p>
559
560 <p>
561 Definition at line <a class="el" href="connection_8h-source.html#l00239">239</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>.
562 <p>
563 Referenced by <a class="el" href="users_8cpp-source.html#l00028">userrec::userrec()</a>.    </td>
564   </tr>
565 </table>
566 <a name="o7" doxytag="connection::cmds_out"></a><p>
567 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
568   <tr>
569     <td class="mdRow">
570       <table cellpadding="0" cellspacing="0" border="0">
571         <tr>
572           <td class="md" nowrap valign="top"> long <a class="el" href="classconnection.html#o7">connection::cmds_out</a>
573       </table>
574     </td>
575   </tr>
576 </table>
577 <table cellspacing=5 cellpadding=0 border=0>
578   <tr>
579     <td>
580       &nbsp;
581     </td>
582     <td>
583
584 <p>
585 Stats counter for commands outbound. 
586 <p>
587
588 <p>
589 Definition at line <a class="el" href="connection_8h-source.html#l00243">243</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>.
590 <p>
591 Referenced by <a class="el" href="users_8cpp-source.html#l00028">userrec::userrec()</a>.    </td>
592   </tr>
593 </table>
594 <a name="o18" doxytag="connection::connectors"></a><p>
595 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
596   <tr>
597     <td class="mdRow">
598       <table cellpadding="0" cellspacing="0" border="0">
599         <tr>
600           <td class="md" nowrap valign="top"> std::vector&lt;<a class="el" href="classircd__connector.html">ircd_connector</a>&gt; <a class="el" href="classconnection.html#o18">connection::connectors</a>
601       </table>
602     </td>
603   </tr>
604 </table>
605 <table cellspacing=5 cellpadding=0 border=0>
606   <tr>
607     <td>
608       &nbsp;
609     </td>
610     <td>
611
612 <p>
613 With a serverrec, this is a list of all established server connections. 
614 <p>
615 With a userrec this is unused.
616 <p>
617 Definition at line <a class="el" href="connection_8h-source.html#l00290">290</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>.    </td>
618   </tr>
619 </table>
620 <a name="o0" doxytag="connection::fd"></a><p>
621 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
622   <tr>
623     <td class="mdRow">
624       <table cellpadding="0" cellspacing="0" border="0">
625         <tr>
626           <td class="md" nowrap valign="top"> int <a class="el" href="classconnection.html#o0">connection::fd</a>
627       </table>
628     </td>
629   </tr>
630 </table>
631 <table cellspacing=5 cellpadding=0 border=0>
632   <tr>
633     <td>
634       &nbsp;
635     </td>
636     <td>
637
638 <p>
639 File descriptor of the connection. 
640 <p>
641
642 <p>
643 Definition at line <a class="el" href="connection_8h-source.html#l00215">215</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>.
644 <p>
645 Referenced by <a class="el" href="modules_8cpp-source.html#l00948">ConfigReader::DumpErrors()</a>, <a class="el" href="modules_8cpp-source.html#l00681">Server::PseudoToUser()</a>, <a class="el" href="modules_8cpp-source.html#l00519">Server::SendTo()</a>, <a class="el" href="servers_8cpp-source.html#l00026">serverrec::serverrec()</a>, <a class="el" href="users_8cpp-source.html#l00028">userrec::userrec()</a>, and <a class="el" href="modules_8cpp-source.html#l00671">Server::UserToPseudo()</a>.    </td>
646   </tr>
647 </table>
648 <a name="o8" doxytag="connection::haspassed"></a><p>
649 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
650   <tr>
651     <td class="mdRow">
652       <table cellpadding="0" cellspacing="0" border="0">
653         <tr>
654           <td class="md" nowrap valign="top"> bool <a class="el" href="classconnection.html#o8">connection::haspassed</a>
655       </table>
656     </td>
657   </tr>
658 </table>
659 <table cellspacing=5 cellpadding=0 border=0>
660   <tr>
661     <td>
662       &nbsp;
663     </td>
664     <td>
665
666 <p>
667 True if server/user has authenticated, false if otherwise. 
668 <p>
669
670 <p>
671 Definition at line <a class="el" href="connection_8h-source.html#l00247">247</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>.
672 <p>
673 Referenced by <a class="el" href="users_8cpp-source.html#l00028">userrec::userrec()</a>.    </td>
674   </tr>
675 </table>
676 <a name="o1" doxytag="connection::host"></a><p>
677 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
678   <tr>
679     <td class="mdRow">
680       <table cellpadding="0" cellspacing="0" border="0">
681         <tr>
682           <td class="md" nowrap valign="top"> char <a class="el" href="classconnection.html#o1">connection::host</a>[256]
683       </table>
684     </td>
685   </tr>
686 </table>
687 <table cellspacing=5 cellpadding=0 border=0>
688   <tr>
689     <td>
690       &nbsp;
691     </td>
692     <td>
693
694 <p>
695 Hostname of connection. 
696 <p>
697 Not used if this is a serverrec
698 <p>
699 Definition at line <a class="el" href="connection_8h-source.html#l00219">219</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>.
700 <p>
701 Referenced by <a class="el" href="users_8cpp-source.html#l00068">userrec::GetFullRealHost()</a>, <a class="el" href="modules_8cpp-source.html#l00681">Server::PseudoToUser()</a>, <a class="el" href="users_8cpp-source.html#l00028">userrec::userrec()</a>, and <a class="el" href="modules_8cpp-source.html#l00671">Server::UserToPseudo()</a>.    </td>
702   </tr>
703 </table>
704 <a name="o14" doxytag="connection::idle_lastmsg"></a><p>
705 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
706   <tr>
707     <td class="mdRow">
708       <table cellpadding="0" cellspacing="0" border="0">
709         <tr>
710           <td class="md" nowrap valign="top"> time_t <a class="el" href="classconnection.html#o14">connection::idle_lastmsg</a>
711       </table>
712     </td>
713   </tr>
714 </table>
715 <table cellspacing=5 cellpadding=0 border=0>
716   <tr>
717     <td>
718       &nbsp;
719     </td>
720     <td>
721
722 <p>
723 Time that the connection last sent data, used to calculate idle time. 
724 <p>
725
726 <p>
727 Definition at line <a class="el" href="connection_8h-source.html#l00273">273</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>.
728 <p>
729 Referenced by <a class="el" href="users_8cpp-source.html#l00028">userrec::userrec()</a>.    </td>
730   </tr>
731 </table>
732 <a name="o3" doxytag="connection::inbuf"></a><p>
733 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
734   <tr>
735     <td class="mdRow">
736       <table cellpadding="0" cellspacing="0" border="0">
737         <tr>
738           <td class="md" nowrap valign="top"> char <a class="el" href="classconnection.html#o3">connection::inbuf</a>[MAXBUF]
739       </table>
740     </td>
741   </tr>
742 </table>
743 <table cellspacing=5 cellpadding=0 border=0>
744   <tr>
745     <td>
746       &nbsp;
747     </td>
748     <td>
749
750 <p>
751 Inbuf of connection. 
752 <p>
753 Only used for userrec
754 <p>
755 Definition at line <a class="el" href="connection_8h-source.html#l00227">227</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>.
756 <p>
757 Referenced by <a class="el" href="users_8cpp-source.html#l00028">userrec::userrec()</a>.    </td>
758   </tr>
759 </table>
760 <a name="o16" doxytag="connection::internal_addr"></a><p>
761 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
762   <tr>
763     <td class="mdRow">
764       <table cellpadding="0" cellspacing="0" border="0">
765         <tr>
766           <td class="md" nowrap valign="top"> char <a class="el" href="classconnection.html#o16">connection::internal_addr</a>[MAXBUF]
767       </table>
768     </td>
769   </tr>
770 </table>
771 <table cellspacing=5 cellpadding=0 border=0>
772   <tr>
773     <td>
774       &nbsp;
775     </td>
776     <td>
777
778 <p>
779 Unused, will be removed in a future alpha/beta. 
780 <p>
781
782 <p>
783 Definition at line <a class="el" href="connection_8h-source.html#l00281">281</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>.    </td>
784   </tr>
785 </table>
786 <a name="o17" doxytag="connection::internal_port"></a><p>
787 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
788   <tr>
789     <td class="mdRow">
790       <table cellpadding="0" cellspacing="0" border="0">
791         <tr>
792           <td class="md" nowrap valign="top"> int <a class="el" href="classconnection.html#o17">connection::internal_port</a>
793       </table>
794     </td>
795   </tr>
796 </table>
797 <table cellspacing=5 cellpadding=0 border=0>
798   <tr>
799     <td>
800       &nbsp;
801     </td>
802     <td>
803
804 <p>
805 Unused, will be removed in a future alpha/beta. 
806 <p>
807
808 <p>
809 Definition at line <a class="el" href="connection_8h-source.html#l00285">285</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>.    </td>
810   </tr>
811 </table>
812 <a name="o2" doxytag="connection::ip"></a><p>
813 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
814   <tr>
815     <td class="mdRow">
816       <table cellpadding="0" cellspacing="0" border="0">
817         <tr>
818           <td class="md" nowrap valign="top"> char <a class="el" href="classconnection.html#o2">connection::ip</a>[32]
819       </table>
820     </td>
821   </tr>
822 </table>
823 <table cellspacing=5 cellpadding=0 border=0>
824   <tr>
825     <td>
826       &nbsp;
827     </td>
828     <td>
829
830 <p>
831 IP of connection. 
832 <p>
833 Reserved for future use.
834 <p>
835 Definition at line <a class="el" href="connection_8h-source.html#l00223">223</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>.
836 <p>
837 Referenced by <a class="el" href="users_8cpp-source.html#l00028">userrec::userrec()</a>.    </td>
838   </tr>
839 </table>
840 <a name="o12" doxytag="connection::lastping"></a><p>
841 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
842   <tr>
843     <td class="mdRow">
844       <table cellpadding="0" cellspacing="0" border="0">
845         <tr>
846           <td class="md" nowrap valign="top"> time_t <a class="el" href="classconnection.html#o12">connection::lastping</a>
847       </table>
848     </td>
849   </tr>
850 </table>
851 <table cellspacing=5 cellpadding=0 border=0>
852   <tr>
853     <td>
854       &nbsp;
855     </td>
856     <td>
857
858 <p>
859 Time the connection was last pinged. 
860 <p>
861
862 <p>
863 Definition at line <a class="el" href="connection_8h-source.html#l00265">265</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>.
864 <p>
865 Referenced by <a class="el" href="servers_8cpp-source.html#l00026">serverrec::serverrec()</a>, and <a class="el" href="users_8cpp-source.html#l00028">userrec::userrec()</a>.    </td>
866   </tr>
867 </table>
868 <a name="o15" doxytag="connection::nping"></a><p>
869 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
870   <tr>
871     <td class="mdRow">
872       <table cellpadding="0" cellspacing="0" border="0">
873         <tr>
874           <td class="md" nowrap valign="top"> time_t <a class="el" href="classconnection.html#o15">connection::nping</a>
875       </table>
876     </td>
877   </tr>
878 </table>
879 <table cellspacing=5 cellpadding=0 border=0>
880   <tr>
881     <td>
882       &nbsp;
883     </td>
884     <td>
885
886 <p>
887 Used by PING checks with clients. 
888 <p>
889
890 <p>
891 Definition at line <a class="el" href="connection_8h-source.html#l00277">277</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>.
892 <p>
893 Referenced by <a class="el" href="users_8cpp-source.html#l00028">userrec::userrec()</a>.    </td>
894   </tr>
895 </table>
896 <a name="o9" doxytag="connection::port"></a><p>
897 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
898   <tr>
899     <td class="mdRow">
900       <table cellpadding="0" cellspacing="0" border="0">
901         <tr>
902           <td class="md" nowrap valign="top"> int <a class="el" href="classconnection.html#o9">connection::port</a>
903       </table>
904     </td>
905   </tr>
906 </table>
907 <table cellspacing=5 cellpadding=0 border=0>
908   <tr>
909     <td>
910       &nbsp;
911     </td>
912     <td>
913
914 <p>
915 Port number For a userrec, this is the port they connected to the network on. 
916 <p>
917 For a serverrec this is the current listening port of the serverrec object.
918 <p>
919 Definition at line <a class="el" href="connection_8h-source.html#l00253">253</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>.
920 <p>
921 Referenced by <a class="el" href="users_8cpp-source.html#l00028">userrec::userrec()</a>.    </td>
922   </tr>
923 </table>
924 <a name="o10" doxytag="connection::registered"></a><p>
925 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
926   <tr>
927     <td class="mdRow">
928       <table cellpadding="0" cellspacing="0" border="0">
929         <tr>
930           <td class="md" nowrap valign="top"> int <a class="el" href="classconnection.html#o10">connection::registered</a>
931       </table>
932     </td>
933   </tr>
934 </table>
935 <table cellspacing=5 cellpadding=0 border=0>
936   <tr>
937     <td>
938       &nbsp;
939     </td>
940     <td>
941
942 <p>
943 Used by userrec to indicate the registration status of the connection. 
944 <p>
945
946 <p>
947 Definition at line <a class="el" href="connection_8h-source.html#l00257">257</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>.
948 <p>
949 Referenced by <a class="el" href="users_8cpp-source.html#l00028">userrec::userrec()</a>.    </td>
950   </tr>
951 </table>
952 <a name="o13" doxytag="connection::signon"></a><p>
953 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
954   <tr>
955     <td class="mdRow">
956       <table cellpadding="0" cellspacing="0" border="0">
957         <tr>
958           <td class="md" nowrap valign="top"> time_t <a class="el" href="classconnection.html#o13">connection::signon</a>
959       </table>
960     </td>
961   </tr>
962 </table>
963 <table cellspacing=5 cellpadding=0 border=0>
964   <tr>
965     <td>
966       &nbsp;
967     </td>
968     <td>
969
970 <p>
971 Time the connection was created, set in the constructor. 
972 <p>
973
974 <p>
975 Definition at line <a class="el" href="connection_8h-source.html#l00269">269</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>.
976 <p>
977 Referenced by <a class="el" href="servers_8cpp-source.html#l00026">serverrec::serverrec()</a>, and <a class="el" href="users_8cpp-source.html#l00028">userrec::userrec()</a>.    </td>
978   </tr>
979 </table>
980 <a name="o11" doxytag="connection::state"></a><p>
981 <table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
982   <tr>
983     <td class="mdRow">
984       <table cellpadding="0" cellspacing="0" border="0">
985         <tr>
986           <td class="md" nowrap valign="top"> short int <a class="el" href="classconnection.html#o11">connection::state</a>
987       </table>
988     </td>
989   </tr>
990 </table>
991 <table cellspacing=5 cellpadding=0 border=0>
992   <tr>
993     <td>
994       &nbsp;
995     </td>
996     <td>
997
998 <p>
999 Reserved for future use. 
1000 <p>
1001
1002 <p>
1003 Definition at line <a class="el" href="connection_8h-source.html#l00261">261</a> of file <a class="el" href="connection_8h-source.html">connection.h</a>.    </td>
1004   </tr>
1005 </table>
1006 <hr>The documentation for this class was generated from the following file:<ul>
1007 <li><a class="el" href="connection_8h-source.html">connection.h</a></ul>
1008 <hr size="1"><address style="align: right;"><small>Generated on Sat May 7 15:34:24 2005 for InspIRCd by
1009 <a href="http://www.doxygen.org/index.html">
1010 <img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
1011 </a>1.3.3 </small></address>
1012 </body>
1013 </html>