]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - docs/man/connection.3
Added ability to update the helpop file on rehash (Bug #69)
[user/henk/code/inspircd.git] / docs / man / connection.3
1 .TH "connection" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*-
2 .ad l
3 .nh
4 .SH NAME
5 connection \- Please note: classes serverrec and userrec both inherit from class connection. 
6
7 .PP
8 .SH SYNOPSIS
9 .br
10 .PP
11 \fC#include <connection.h>\fP
12 .PP
13 Inherits \fBExtensible\fP.
14 .PP
15 Inherited by \fBserverrec\fP, and \fBuserrec\fP.
16 .PP
17 .SS "Public Member Functions"
18
19 .in +1c
20 .ti -1c
21 .RI "\fBconnection\fP ()"
22 .br
23 .RI "\fIDefault constructor.\fP"
24 .ti -1c
25 .RI "bool \fBCreateListener\fP (char *\fBhost\fP, int p)"
26 .br
27 .RI "\fICreate a listening socket on 'host' using port number 'p'.\fP"
28 .ti -1c
29 .RI "bool \fBBeginLink\fP (char *targethost, int \fBport\fP, char *password, char *servername, int myport)"
30 .br
31 .RI "\fIBegin an outbound link to another ircd at targethost.\fP"
32 .ti -1c
33 .RI "bool \fBMeshCookie\fP (char *targethost, int \fBport\fP, long cookie, char *servername)"
34 .br
35 .RI "\fIBegin an outbound mesh link to another ircd on a network you are already an authenticated member of.\fP"
36 .ti -1c
37 .RI "void \fBTerminateLink\fP (char *targethost)"
38 .br
39 .RI "\fITerminate a link to 'targethost' by calling the \fBircd_connector::CloseConnection\fP method.\fP"
40 .ti -1c
41 .RI "bool \fBSendPacket\fP (char *message, const char *\fBhost\fP)"
42 .br
43 .RI "\fISend 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.\fP"
44 .ti -1c
45 .RI "bool \fBRecvPacket\fP (std::deque< std::string > &messages, char *\fBhost\fP)"
46 .br
47 .RI "\fIReturns the next available packet and returns true if data is available.\fP"
48 .ti -1c
49 .RI "\fBircd_connector\fP * \fBFindHost\fP (std::string \fBhost\fP)"
50 .br
51 .RI "\fIFind the \fBircd_connector\fP oject related to a certain servername given in 'host'.\fP"
52 .ti -1c
53 .RI "bool \fBAddIncoming\fP (int \fBfd\fP, char *targethost, int sourceport)"
54 .br
55 .RI "\fIAdd an incoming connection to the connection pool.\fP"
56 .ti -1c
57 .RI "long \fBGenKey\fP ()"
58 .br
59 .RI "\fIThis function is deprecated and may be removed in a later alpha/beta.\fP"
60 .in -1c
61 .SS "Public Attributes"
62
63 .in +1c
64 .ti -1c
65 .RI "int \fBfd\fP"
66 .br
67 .RI "\fIFile descriptor of the connection.\fP"
68 .ti -1c
69 .RI "char \fBhost\fP [256]"
70 .br
71 .RI "\fIHostname of connection.\fP"
72 .ti -1c
73 .RI "char \fBip\fP [32]"
74 .br
75 .RI "\fIIP of connection.\fP"
76 .ti -1c
77 .RI "char \fBinbuf\fP [MAXBUF]"
78 .br
79 .RI "\fIInbuf of connection.\fP"
80 .ti -1c
81 .RI "long \fBbytes_in\fP"
82 .br
83 .RI "\fIStats counter for bytes inbound.\fP"
84 .ti -1c
85 .RI "long \fBbytes_out\fP"
86 .br
87 .RI "\fIStats counter for bytes outbound.\fP"
88 .ti -1c
89 .RI "long \fBcmds_in\fP"
90 .br
91 .RI "\fIStats counter for commands inbound.\fP"
92 .ti -1c
93 .RI "long \fBcmds_out\fP"
94 .br
95 .RI "\fIStats counter for commands outbound.\fP"
96 .ti -1c
97 .RI "bool \fBhaspassed\fP"
98 .br
99 .RI "\fITrue if server/user has authenticated, false if otherwise.\fP"
100 .ti -1c
101 .RI "int \fBport\fP"
102 .br
103 .RI "\fIPort number For a userrec, this is the port they connected to the network on.\fP"
104 .ti -1c
105 .RI "int \fBregistered\fP"
106 .br
107 .RI "\fIUsed by userrec to indicate the registration status of the connection.\fP"
108 .ti -1c
109 .RI "short int \fBstate\fP"
110 .br
111 .RI "\fIReserved for future use.\fP"
112 .ti -1c
113 .RI "time_t \fBlastping\fP"
114 .br
115 .RI "\fITime the connection was last pinged.\fP"
116 .ti -1c
117 .RI "time_t \fBsignon\fP"
118 .br
119 .RI "\fITime the connection was created, set in the constructor.\fP"
120 .ti -1c
121 .RI "time_t \fBidle_lastmsg\fP"
122 .br
123 .RI "\fITime that the connection last sent data, used to calculate idle time.\fP"
124 .ti -1c
125 .RI "time_t \fBnping\fP"
126 .br
127 .RI "\fIUsed by PING checks with clients.\fP"
128 .ti -1c
129 .RI "char \fBinternal_addr\fP [MAXBUF]"
130 .br
131 .RI "\fIUnused, will be removed in a future alpha/beta.\fP"
132 .ti -1c
133 .RI "int \fBinternal_port\fP"
134 .br
135 .RI "\fIUnused, will be removed in a future alpha/beta.\fP"
136 .ti -1c
137 .RI "std::vector< \fBircd_connector\fP > \fBconnectors\fP"
138 .br
139 .RI "\fIWith a serverrec, this is a list of all established server connections.\fP"
140 .in -1c
141 .SH "Detailed Description"
142 .PP 
143 Please note: classes serverrec and userrec both inherit from class connection.Definition at line 161 of file connection.h.
144 .SH "Constructor & Destructor Documentation"
145 .PP 
146 .SS "connection::connection ()"
147 .PP
148 Default constructor.
149 .SH "Member Function Documentation"
150 .PP 
151 .SS "bool connection::AddIncoming (int fd, char * targethost, int sourceport)"
152 .PP
153 Add an incoming connection to the connection pool.(reserved for core use)
154 .SS "bool connection::BeginLink (char * targethost, int port, char * password, char * servername, int myport)"
155 .PP
156 Begin an outbound link to another ircd at targethost.
157 .SS "bool connection::CreateListener (char * host, int p)"
158 .PP
159 Create a listening socket on 'host' using port number 'p'.
160 .SS "\fBircd_connector\fP* connection::FindHost (std::string host)"
161 .PP
162 Find the \fBircd_connector\fP oject related to a certain servername given in 'host'.
163 .SS "long connection::GenKey ()"
164 .PP
165 This function is deprecated and may be removed in a later alpha/beta.
166 .SS "bool connection::MeshCookie (char * targethost, int port, long cookie, char * servername)"
167 .PP
168 Begin an outbound mesh link to another ircd on a network you are already an authenticated member of.
169 .SS "bool connection::RecvPacket (std::deque< std::string > & messages, char * host)"
170 .PP
171 Returns the next available packet and returns true if data is available.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.
172 .SS "bool connection::SendPacket (char * message, const char * host)"
173 .PP
174 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.
175 .SS "void connection::TerminateLink (char * targethost)"
176 .PP
177 Terminate a link to 'targethost' by calling the \fBircd_connector::CloseConnection\fP method.
178 .SH "Member Data Documentation"
179 .PP 
180 .SS "long connection::bytes_in"
181 .PP
182 Stats counter for bytes inbound.Definition at line 182 of file connection.h.
183 .PP
184 Referenced by userrec::userrec().
185 .SS "long connection::bytes_out"
186 .PP
187 Stats counter for bytes outbound.Definition at line 186 of file connection.h.
188 .PP
189 Referenced by userrec::userrec().
190 .SS "long connection::cmds_in"
191 .PP
192 Stats counter for commands inbound.Definition at line 190 of file connection.h.
193 .PP
194 Referenced by userrec::userrec().
195 .SS "long connection::cmds_out"
196 .PP
197 Stats counter for commands outbound.Definition at line 194 of file connection.h.
198 .PP
199 Referenced by userrec::userrec().
200 .SS "std::vector<\fBircd_connector\fP> connection::connectors"
201 .PP
202 With a serverrec, this is a list of all established server connections.With a userrec this is unused.Definition at line 241 of file connection.h.
203 .SS "int connection::fd"
204 .PP
205 File descriptor of the connection.Definition at line 166 of file connection.h.
206 .PP
207 Referenced by Server::SendTo(), serverrec::serverrec(), and userrec::userrec().
208 .SS "bool connection::haspassed"
209 .PP
210 True if server/user has authenticated, false if otherwise.Definition at line 198 of file connection.h.
211 .PP
212 Referenced by userrec::userrec().
213 .SS "char connection::host[256]"
214 .PP
215 Hostname of connection.Not used if this is a serverrecDefinition at line 170 of file connection.h.
216 .SS "time_t connection::idle_lastmsg"
217 .PP
218 Time that the connection last sent data, used to calculate idle time.Definition at line 224 of file connection.h.
219 .PP
220 Referenced by userrec::userrec().
221 .SS "char connection::inbuf[MAXBUF]"
222 .PP
223 Inbuf of connection.Only used for userrecDefinition at line 178 of file connection.h.
224 .SS "char connection::internal_addr[MAXBUF]"
225 .PP
226 Unused, will be removed in a future alpha/beta.Definition at line 232 of file connection.h.
227 .SS "int connection::internal_port"
228 .PP
229 Unused, will be removed in a future alpha/beta.Definition at line 236 of file connection.h.
230 .SS "char connection::ip[32]"
231 .PP
232 IP of connection.Reserved for future use.Definition at line 174 of file connection.h.
233 .SS "time_t connection::lastping"
234 .PP
235 Time the connection was last pinged.Definition at line 216 of file connection.h.
236 .PP
237 Referenced by serverrec::serverrec(), and userrec::userrec().
238 .SS "time_t connection::nping"
239 .PP
240 Used by PING checks with clients.Definition at line 228 of file connection.h.
241 .PP
242 Referenced by userrec::userrec().
243 .SS "int connection::port"
244 .PP
245 Port number For a userrec, this is the port they connected to the network on.For a serverrec this is the current listening port of the serverrec object.Definition at line 204 of file connection.h.
246 .PP
247 Referenced by userrec::userrec().
248 .SS "int connection::registered"
249 .PP
250 Used by userrec to indicate the registration status of the connection.Definition at line 208 of file connection.h.
251 .PP
252 Referenced by userrec::userrec().
253 .SS "time_t connection::signon"
254 .PP
255 Time the connection was created, set in the constructor.Definition at line 220 of file connection.h.
256 .PP
257 Referenced by serverrec::serverrec(), and userrec::userrec().
258 .SS "short int connection::state"
259 .PP
260 Reserved for future use.Definition at line 212 of file connection.h.
261
262 .SH "Author"
263 .PP 
264 Generated automatically by Doxygen for InspIRCd from the source code.