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