]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - docs/man/man3/connection.3
Re-added the dot graphs again
[user/henk/code/inspircd.git] / docs / man / man3 / connection.3
1 .TH "connection" 3 "13 May 2005" "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, unsigned 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 .in -1c
57 .SS "Public Attributes"
58
59 .in +1c
60 .ti -1c
61 .RI "int \fBfd\fP"
62 .br
63 .RI "\fIFile descriptor of the connection. \fP"
64 .ti -1c
65 .RI "char \fBhost\fP [160]"
66 .br
67 .RI "\fIHostname of connection. \fP"
68 .ti -1c
69 .RI "char \fBip\fP [16]"
70 .br
71 .RI "\fIIP of connection. \fP"
72 .ti -1c
73 .RI "long \fBbytes_in\fP"
74 .br
75 .RI "\fIStats counter for bytes inbound. \fP"
76 .ti -1c
77 .RI "long \fBbytes_out\fP"
78 .br
79 .RI "\fIStats counter for bytes outbound. \fP"
80 .ti -1c
81 .RI "long \fBcmds_in\fP"
82 .br
83 .RI "\fIStats counter for commands inbound. \fP"
84 .ti -1c
85 .RI "long \fBcmds_out\fP"
86 .br
87 .RI "\fIStats counter for commands outbound. \fP"
88 .ti -1c
89 .RI "bool \fBhaspassed\fP"
90 .br
91 .RI "\fITrue if server/user has authenticated, false if otherwise. \fP"
92 .ti -1c
93 .RI "int \fBport\fP"
94 .br
95 .RI "\fIPort number For a userrec, this is the port they connected to the network on. \fP"
96 .ti -1c
97 .RI "char \fBregistered\fP"
98 .br
99 .RI "\fIUsed by userrec to indicate the registration status of the connection. \fP"
100 .ti -1c
101 .RI "time_t \fBlastping\fP"
102 .br
103 .RI "\fITime the connection was last pinged. \fP"
104 .ti -1c
105 .RI "time_t \fBsignon\fP"
106 .br
107 .RI "\fITime the connection was created, set in the constructor. \fP"
108 .ti -1c
109 .RI "time_t \fBidle_lastmsg\fP"
110 .br
111 .RI "\fITime that the connection last sent data, used to calculate idle time. \fP"
112 .ti -1c
113 .RI "time_t \fBnping\fP"
114 .br
115 .RI "\fIUsed by PING checks with clients. \fP"
116 .ti -1c
117 .RI "std::vector< \fBircd_connector\fP > \fBconnectors\fP"
118 .br
119 .RI "\fIWith a serverrec, this is a list of all established server connections. \fP"
120 .in -1c
121 .SH "Detailed Description"
122 .PP 
123 Please note: classes serverrec and userrec both inherit from class connection. Definition at line 210 of file connection.h.
124 .SH "Constructor & Destructor Documentation"
125 .PP 
126 .SS "connection::connection ()"
127 .PP
128 Default constructor. 
129 .SH "Member Function Documentation"
130 .PP 
131 .SS "bool connection::AddIncoming (int fd, char * targethost, int sourceport)"
132 .PP
133 Add an incoming connection to the connection pool. (reserved for core use)
134 .SS "bool connection::BeginLink (char * targethost, int port, char * password, char * servername, int myport)"
135 .PP
136 Begin an outbound link to another ircd at targethost. 
137 .SS "bool connection::CreateListener (char * host, int p)"
138 .PP
139 Create a listening socket on 'host' using port number 'p'. 
140 .SS "\fBircd_connector\fP* connection::FindHost (std::string host)"
141 .PP
142 Find the \fBircd_connector\fP oject related to a certain servername given in 'host'. 
143 .SS "bool connection::MeshCookie (char * targethost, int port, unsigned long cookie, char * servername)"
144 .PP
145 Begin an outbound mesh link to another ircd on a network you are already an authenticated member of. 
146 .SS "bool connection::RecvPacket (std::deque< std::string > & messages, char * host)"
147 .PP
148 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.
149 .SS "bool connection::SendPacket (char * message, const char * host)"
150 .PP
151 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. 
152 .SS "void connection::TerminateLink (char * targethost)"
153 .PP
154 Terminate a link to 'targethost' by calling the \fBircd_connector::CloseConnection\fP method. 
155 .SH "Member Data Documentation"
156 .PP 
157 .SS "long \fBconnection::bytes_in\fP"
158 .PP
159 Stats counter for bytes inbound. Definition at line 227 of file connection.h.
160 .PP
161 Referenced by userrec::userrec().
162 .SS "long \fBconnection::bytes_out\fP"
163 .PP
164 Stats counter for bytes outbound. Definition at line 231 of file connection.h.
165 .PP
166 Referenced by userrec::FlushWriteBuf(), and userrec::userrec().
167 .SS "long \fBconnection::cmds_in\fP"
168 .PP
169 Stats counter for commands inbound. Definition at line 235 of file connection.h.
170 .PP
171 Referenced by userrec::userrec().
172 .SS "long \fBconnection::cmds_out\fP"
173 .PP
174 Stats counter for commands outbound. Definition at line 239 of file connection.h.
175 .PP
176 Referenced by userrec::FlushWriteBuf(), and userrec::userrec().
177 .SS "std::vector<\fBircd_connector\fP> \fBconnection::connectors\fP"
178 .PP
179 With a serverrec, this is a list of all established server connections. With a userrec this is unused.Definition at line 274 of file connection.h.
180 .SS "int \fBconnection::fd\fP"
181 .PP
182 File descriptor of the connection. Definition at line 215 of file connection.h.
183 .PP
184 Referenced by ConfigReader::DumpErrors(), Server::PseudoToUser(), Server::SendTo(), serverrec::serverrec(), userrec::userrec(), and Server::UserToPseudo().
185 .SS "bool \fBconnection::haspassed\fP"
186 .PP
187 True if server/user has authenticated, false if otherwise. Definition at line 243 of file connection.h.
188 .PP
189 Referenced by userrec::userrec().
190 .SS "char \fBconnection::host\fP[160]"
191 .PP
192 Hostname of connection. Not used if this is a serverrecDefinition at line 219 of file connection.h.
193 .PP
194 Referenced by userrec::GetFullRealHost(), Server::PseudoToUser(), userrec::userrec(), and Server::UserToPseudo().
195 .SS "time_t \fBconnection::idle_lastmsg\fP"
196 .PP
197 Time that the connection last sent data, used to calculate idle time. Definition at line 265 of file connection.h.
198 .PP
199 Referenced by userrec::userrec().
200 .SS "char \fBconnection::ip\fP[16]"
201 .PP
202 IP of connection. Definition at line 223 of file connection.h.
203 .PP
204 Referenced by userrec::userrec().
205 .SS "time_t \fBconnection::lastping\fP"
206 .PP
207 Time the connection was last pinged. Definition at line 257 of file connection.h.
208 .PP
209 Referenced by serverrec::serverrec(), and userrec::userrec().
210 .SS "time_t \fBconnection::nping\fP"
211 .PP
212 Used by PING checks with clients. Definition at line 269 of file connection.h.
213 .PP
214 Referenced by userrec::userrec().
215 .SS "int \fBconnection::port\fP"
216 .PP
217 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 249 of file connection.h.
218 .PP
219 Referenced by userrec::userrec().
220 .SS "char \fBconnection::registered\fP"
221 .PP
222 Used by userrec to indicate the registration status of the connection. Definition at line 253 of file connection.h.
223 .PP
224 Referenced by userrec::userrec().
225 .SS "time_t \fBconnection::signon\fP"
226 .PP
227 Time the connection was created, set in the constructor. Definition at line 261 of file connection.h.
228 .PP
229 Referenced by serverrec::serverrec(), and userrec::userrec().
230
231 .SH "Author"
232 .PP 
233 Generated automatically by Doxygen for InspIRCd from the source code.