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