From 52899de0ff2d62ca0542b243c41626010bf62083 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 25 Mar 2005 03:51:56 +0000 Subject: Documentation update git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@899 e03df62e-2008-0410-955e-edbf42e46eb7 --- docs/module-doc/classconnection.html | 551 ++++++++++++++++++----------------- 1 file changed, 289 insertions(+), 262 deletions(-) (limited to 'docs/module-doc/classconnection.html') diff --git a/docs/module-doc/classconnection.html b/docs/module-doc/classconnection.html index 8e4d6222d..3eb501874 100644 --- a/docs/module-doc/classconnection.html +++ b/docs/module-doc/classconnection.html @@ -1,106 +1,127 @@ -connection class Reference +InspIRCd: connection class Reference - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  
-

connection Class Reference

Please note: classes serverrec and userrec both inherit from class connection. + +
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members
+

connection Class Reference

Please note: classes serverrec and userrec both inherit from class connection. More...

#include <connection.h>

-Inheritance diagram for connection:

Inheritance graph
- - - - - - -
[legend]
Collaboration diagram for connection:

Collaboration graph
- - - -
[legend]
List of all members. +Inherits Extensible. +

+Inherited by serverrec, and userrec. +

+List of all members.

- - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

 connection ()
 Default constructor.

bool CreateListener (char *host, int p)
 Create a listening socket on 'host' using port number 'p'.

bool BeginLink (char *targethost, int port, char *password, char *servername, int myport)
 Begin an outbound link to another ircd at targethost.

bool MeshCookie (char *targethost, int port, long cookie, char *servername)
 Begin an outbound mesh link to another ircd on a network you are already an authenticated member of.

void TerminateLink (char *targethost)
 Terminate a link to 'targethost' by calling the ircd_connector::CloseConnection method.

bool SendPacket (char *message, const char *host)
 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.

bool RecvPacket (std::deque< std::string > &messages, char *host)
 Returns the next available packet and returns true if data is available.

ircd_connectorFindHost (std::string host)
 Find the ircd_connector oject related to a certain servername given in 'host'.

bool AddIncoming (int fd, char *targethost, int sourceport)
 Add an incoming connection to the connection pool.

long GenKey ()
 This function is deprecated and may be removed in a later alpha/beta.

 connection ()
 Default constructor.

bool CreateListener (char *host, int p)
 Create a listening socket on 'host' using port number 'p'.

bool BeginLink (char *targethost, int port, char *password, char *servername, int myport)
 Begin an outbound link to another ircd at targethost.

bool MeshCookie (char *targethost, int port, long cookie, char *servername)
 Begin an outbound mesh link to another ircd on a network you are already an authenticated member of.

void TerminateLink (char *targethost)
 Terminate a link to 'targethost' by calling the ircd_connector::CloseConnection method.

bool SendPacket (char *message, const char *host)
 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.

bool RecvPacket (std::deque< std::string > &messages, char *host)
 Returns the next available packet and returns true if data is available.

ircd_connectorFindHost (std::string host)
 Find the ircd_connector oject related to a certain servername given in 'host'.

bool AddIncoming (int fd, char *targethost, int sourceport)
 Add an incoming connection to the connection pool.

long GenKey ()
 This function is deprecated and may be removed in a later alpha/beta.


Public Attributes

int fd
 File descriptor of the connection.

char host [256]
 Hostname of connection.

char ip [32]
 IP of connection.

char inbuf [MAXBUF]
 Inbuf of connection.

long bytes_in
 Stats counter for bytes inbound.

long bytes_out
 Stats counter for bytes outbound.

long cmds_in
 Stats counter for commands inbound.

long cmds_out
 Stats counter for commands outbound.

bool haspassed
 True if server/user has authenticated, false if otherwise.

int port
 Port number For a userrec, this is the port they connected to the network on.

int registered
 Used by userrec to indicate the registration status of the connection.

short int state
 Reserved for future use.

time_t lastping
 Time the connection was last pinged.

time_t signon
 Time the connection was created, set in the constructor.

time_t idle_lastmsg
 Time that the connection last sent data, used to calculate idle time.

time_t nping
 Used by PING checks with clients.

char internal_addr [MAXBUF]
 Unused, will be removed in a future alpha/beta.

int internal_port
 Unused, will be removed in a future alpha/beta.

std::vector< ircd_connectorconnectors
 With a serverrec, this is a list of all established server connections.

int fd
 File descriptor of the connection.

char host [256]
 Hostname of connection.

char ip [32]
 IP of connection.

char inbuf [MAXBUF]
 Inbuf of connection.

long bytes_in
 Stats counter for bytes inbound.

long bytes_out
 Stats counter for bytes outbound.

long cmds_in
 Stats counter for commands inbound.

long cmds_out
 Stats counter for commands outbound.

bool haspassed
 True if server/user has authenticated, false if otherwise.

int port
 Port number For a userrec, this is the port they connected to the network on.

int registered
 Used by userrec to indicate the registration status of the connection.

short int state
 Reserved for future use.

time_t lastping
 Time the connection was last pinged.

time_t signon
 Time the connection was created, set in the constructor.

time_t idle_lastmsg
 Time that the connection last sent data, used to calculate idle time.

time_t nping
 Used by PING checks with clients.

char internal_addr [MAXBUF]
 Unused, will be removed in a future alpha/beta.

int internal_port
 Unused, will be removed in a future alpha/beta.

std::vector< ircd_connectorconnectors
 With a serverrec, this is a list of all established server connections.


Detailed Description

-Please note: classes serverrec and userrec both inherit from class connection. +Please note: classes serverrec and userrec both inherit from class connection.

-Definition at line 161 of file connection.h.


Constructor & Destructor Documentation

+Definition at line 173 of file connection.h.

Constructor & Destructor Documentation

- +
-
+ - - + + @@ -116,34 +137,34 @@ Definition at line 161
connection::connection    ) 

-Default constructor. +Default constructor.


Member Function Documentation

- +
-
+ - + - + - + @@ -163,45 +184,45 @@ Default constructor.
bool connection::AddIncoming int   fd, fd,
char *   targethost, targethost,
int   sourceport sourceport

-Add an incoming connection to the connection pool. +Add an incoming connection to the connection pool.

(reserved for core use)

- +
-
+ - + - + - + - + - + @@ -221,27 +242,27 @@ Add an incoming connection to the connection pool.
bool connection::BeginLink char *   targethost, targethost,
int   port, port,
char *   password, password,
char *   servername, servername,
int   myport myport

-Begin an outbound link to another ircd at targethost. +Begin an outbound link to another ircd at targethost.

- +
-
+ - + - + @@ -261,22 +282,22 @@ Begin an outbound link to another ircd at targethost.
bool connection::CreateListener char *   host, host,
int   p p

-Create a listening socket on 'host' using port number 'p'. +Create a listening socket on 'host' using port number 'p'.

- +
-
+ - - + + @@ -292,21 +313,21 @@ Create a listening socket on 'host' using port number 'p'.
ircd_connector* connection::FindHost std::string   host host  ) 

-Find the ircd_connector oject related to a certain servername given in 'host'. +Find the ircd_connector oject related to a certain servername given in 'host'.

- +
-
+ - - + + @@ -322,39 +343,39 @@ Find the ircd_connector oject
long connection::GenKey    ) 

-This function is deprecated and may be removed in a later alpha/beta. +This function is deprecated and may be removed in a later alpha/beta.

- +
-
+ - + - + - + - + @@ -374,27 +395,27 @@ This function is deprecated and may be removed in a later alpha/beta.
bool connection::MeshCookie char *   targethost, targethost,
int   port, port,
long   cookie, cookie,
char *   servername servername

-Begin an outbound mesh link to another ircd on a network you are already an authenticated member of. +Begin an outbound mesh link to another ircd on a network you are already an authenticated member of.

- +
-
+ - + - + @@ -414,27 +435,27 @@ Begin an outbound mesh link to another ircd on a network you are already an auth
bool connection::RecvPacket std::deque< std::string > &   messages, messages,
char *   host host

-Returns the next available packet and returns true if data is available. +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.

- +
-
+ - + - + @@ -454,22 +475,22 @@ Writes the servername the data came from to 'host'. If no data is available this
bool connection::SendPacket char *   message, message,
const char *   host host

-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. +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.

- +
-
+ - - + + @@ -485,19 +506,19 @@ Send a message to a server by name, if the server is unavailable directly route
void connection::TerminateLink char *   targethost targethost  ) 

-Terminate a link to 'targethost' by calling the ircd_connector::CloseConnection method. +Terminate a link to 'targethost' by calling the ircd_connector::CloseConnection method.


Member Data Documentation

-

- +

+

- @@ -510,22 +531,22 @@ Terminate a link to 'targethost' by calling the 182 of file connection.h. +Definition at line 194 of file connection.h.

-Referenced by userrec::userrec(). +Referenced by userrec::userrec().

+ -
long connection::bytes_in + long connection::bytes_in
-

- +

+

- @@ -538,22 +559,22 @@ Referenced by userrec::userre +Referenced by userrec::userrec().
+ -
long connection::bytes_out + long connection::bytes_out

-Stats counter for bytes outbound. +Stats counter for bytes outbound.

-Definition at line 186 of file connection.h. +Definition at line 198 of file connection.h.

-Referenced by userrec::userrec().

-

- +

+

- @@ -566,22 +587,22 @@ Referenced by userrec::userre +Referenced by userrec::userrec().
+ -
long connection::cmds_in + long connection::cmds_in

-Stats counter for commands inbound. +Stats counter for commands inbound.

-Definition at line 190 of file connection.h. +Definition at line 202 of file connection.h.

-Referenced by userrec::userrec().

-

- +

+

- @@ -594,22 +615,22 @@ Referenced by userrec::userre +Referenced by userrec::userrec().
+ -
long connection::cmds_out + long connection::cmds_out

-Stats counter for commands outbound. +Stats counter for commands outbound.

-Definition at line 194 of file connection.h. +Definition at line 206 of file connection.h.

-Referenced by userrec::userrec().

-

- +

+

- @@ -622,20 +643,20 @@ Referenced by userrec::userre +Definition at line 253 of file connection.h.
+ -
std::vector<ircd_connector> connection::connectors + std::vector<ircd_connector> connection::connectors

-With a serverrec, this is a list of all established server connections. +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.

-

- +

+

- @@ -648,22 +669,22 @@ Definition at line 241 +Referenced by ConfigReader::DumpErrors(), Server::SendTo(), serverrec::serverrec(), and userrec::userrec().
+ -
int connection::fd + int connection::fd

-File descriptor of the connection. +File descriptor of the connection.

-Definition at line 166 of file connection.h. +Definition at line 178 of file connection.h.

-Referenced by Server::SendTo(), serverrec::serverrec(), and userrec::userrec().

-

- +

+

- @@ -676,22 +697,22 @@ Referenced by Server::SendT +Referenced by userrec::userrec().
+ -
bool connection::haspassed + bool connection::haspassed

-True if server/user has authenticated, false if otherwise. +True if server/user has authenticated, false if otherwise.

-Definition at line 198 of file connection.h. +Definition at line 210 of file connection.h.

-Referenced by userrec::userrec().

-

- +

+

- @@ -704,20 +725,22 @@ Referenced by userrec::userre +Definition at line 182 of file connection.h. +

+Referenced by userrec::GetFullRealHost(), and userrec::userrec().

+ -
char connection::host[256] + char connection::host[256]

-Hostname of connection. +Hostname of connection.

Not used if this is a serverrec

-Definition at line 170 of file connection.h.

-

- +

+

- @@ -730,22 +753,22 @@ Definition at line 170 +Referenced by userrec::userrec().
+ -
time_t connection::idle_lastmsg + time_t connection::idle_lastmsg

-Time that the connection last sent data, used to calculate idle time. +Time that the connection last sent data, used to calculate idle time.

-Definition at line 224 of file connection.h. +Definition at line 236 of file connection.h.

-Referenced by userrec::userrec().

-

- +

+

- @@ -758,20 +781,22 @@ Referenced by userrec::userre +Definition at line 190 of file connection.h. +

+Referenced by userrec::userrec().

+ -
char connection::inbuf[MAXBUF] + char connection::inbuf[MAXBUF]

-Inbuf of connection. +Inbuf of connection.

Only used for userrec

-Definition at line 178 of file connection.h.

-

- +

+

- @@ -784,20 +809,20 @@ Definition at line 178 +Definition at line 244 of file connection.h.
+ -
char connection::internal_addr[MAXBUF] + char connection::internal_addr[MAXBUF]

-Unused, will be removed in a future alpha/beta. +Unused, will be removed in a future alpha/beta.

-Definition at line 232 of file connection.h.

-

- +

+

- @@ -810,20 +835,20 @@ Definition at line 232 +Definition at line 248 of file connection.h.
+ -
int connection::internal_port + int connection::internal_port

-Unused, will be removed in a future alpha/beta. +Unused, will be removed in a future alpha/beta.

-Definition at line 236 of file connection.h.

-

- +

+

- @@ -836,20 +861,22 @@ Definition at line 236 +Definition at line 186 of file connection.h. +

+Referenced by userrec::userrec().

+ -
char connection::ip[32] + char connection::ip[32]

-IP of connection. +IP of connection.

Reserved for future use.

-Definition at line 174 of file connection.h.

-

- +

+

- @@ -862,22 +889,22 @@ Definition at line 174 +Referenced by serverrec::serverrec(), and userrec::userrec().
+ -
time_t connection::lastping + time_t connection::lastping

-Time the connection was last pinged. +Time the connection was last pinged.

-Definition at line 216 of file connection.h. +Definition at line 228 of file connection.h.

-Referenced by serverrec::serverrec(), and userrec::userrec().

-

- +

+

- @@ -890,22 +917,22 @@ Referenced by serverrec::se +Referenced by userrec::userrec().
+ -
time_t connection::nping + time_t connection::nping

-Used by PING checks with clients. +Used by PING checks with clients.

-Definition at line 228 of file connection.h. +Definition at line 240 of file connection.h.

-Referenced by userrec::userrec().

-

- +

+

- @@ -918,22 +945,22 @@ Referenced by userrec::userre +Referenced by userrec::userrec().
+ -
int connection::port + int connection::port

-Port number For a userrec, this is the port they connected to the network on. +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. +Definition at line 216 of file connection.h.

-Referenced by userrec::userrec().

-

- +

+

- @@ -946,22 +973,22 @@ Referenced by userrec::userre +Referenced by userrec::userrec().
+ -
int connection::registered + int connection::registered

-Used by userrec to indicate the registration status of the connection. +Used by userrec to indicate the registration status of the connection.

-Definition at line 208 of file connection.h. +Definition at line 220 of file connection.h.

-Referenced by userrec::userrec().

-

- +

+

- @@ -974,22 +1001,22 @@ Referenced by userrec::userre +Referenced by serverrec::serverrec(), and userrec::userrec().
+ -
time_t connection::signon + time_t connection::signon

-Time the connection was created, set in the constructor. +Time the connection was created, set in the constructor.

-Definition at line 220 of file connection.h. +Definition at line 232 of file connection.h.

-Referenced by serverrec::serverrec(), and userrec::userrec().

-

- +

+

- @@ -1002,18 +1029,18 @@ Referenced by serverrec::se +Definition at line 224 of file connection.h.
+ -
short int connection::state + short int connection::state

-Reserved for future use. +Reserved for future use.

-Definition at line 212 of file connection.h.


The documentation for this class was generated from the following file: -
Generated on Sun May 2 00:09:34 2004 for InspIRCd by +
Generated on Fri Mar 25 03:49:32 2005 for InspIRCd by -doxygen1.3-rc3
+doxygen +1.3.3
-- cgit v1.2.3