X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=docs%2Fmodule-doc%2Fconnection_8h-source.html;h=66fa4b81576a129ba2b8f7cd4dce8e8d679ba406;hb=654ff4ae2f06704de2beb1050021c8196f693cb5;hp=4228ba2d5632ead0db4d0fc4b0dae988900d39c3;hpb=0f2cf28d39404881b9719330ca86757c51b87bad;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/docs/module-doc/connection_8h-source.html b/docs/module-doc/connection_8h-source.html index 4228ba2d5..66fa4b815 100644 --- a/docs/module-doc/connection_8h-source.html +++ b/docs/module-doc/connection_8h-source.html @@ -1,165 +1,176 @@
-00001 /* -00002 -00003 */ -00004 -00005 #include "inspircd_config.h" -00006 #include "base.h" -00007 #include <string> -00008 #include <map> -00009 #include <sys/socket.h> -00010 #include <sys/types.h> -00011 #include <netdb.h> -00012 #include <netinet/in.h> -00013 #include <unistd.h> -00014 #include <errno.h> -00015 #include <time.h> -00016 #include <vector> -00017 #include <deque> -00018 -00019 #ifndef __CONNECTION_H__ -00020 #define __CONNECTION_H__ -00021 -00022 #define STATE_DISCONNECTED 0 -00023 #define STATE_CONNECTED 1 -00024 #define STATE_SYNC 2 -00025 #define STATE_NOAUTH_INBOUND 3 -00026 #define STATE_NOAUTH_OUTBOUND 4 -00027 #define STATE_SERVICES 5 -00028 -00041 class ircd_connector : public Extensible -00042 { -00043 private: -00046 sockaddr_in addr; -00047 -00050 int fd; -00051 -00054 std::string servername; -00055 -00058 std::string description; + +Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members+connection.h
Go to the documentation of this file.00001 /* +------------------------------------+ +00002 * | Inspire Internet Relay Chat Daemon | +00003 * +------------------------------------+ +00004 * +00005 * Inspire is copyright (C) 2002-2004 ChatSpike-Dev. +00006 * E-mail: +00007 * <brain@chatspike.net> +00008 * <Craig@chatspike.net> +00009 * +00010 * Written by Craig Edwards, Craig McLure, and others. +00011 * This program is free but copyrighted software; see +00012 * the file COPYING for details. +00013 * +00014 * --------------------------------------------------- +00015 */ +00016 +00017 #include "inspircd_config.h" +00018 #include "base.h" +00019 #include <string> +00020 #include <map> +00021 #include <sys/types.h> +00022 #include <sys/socket.h> +00023 #include <netdb.h> +00024 #include <netinet/in.h> +00025 #include <unistd.h> +00026 #include <errno.h> +00027 #include <time.h> +00028 #include <vector> +00029 #include <deque> +00030 +00031 #ifndef __CONNECTION_H__ +00032 #define __CONNECTION_H__ +00033 +00034 #define STATE_DISCONNECTED 0 +00035 #define STATE_CONNECTED 1 +00036 #define STATE_SYNC 2 +00037 #define STATE_NOAUTH_INBOUND 3 +00038 #define STATE_NOAUTH_OUTBOUND 4 +00039 #define STATE_SERVICES 5 +00040 +00053 class ircd_connector : public Extensible +00054 { +00055 private: +00058 sockaddr_in addr; 00059 -00063 int state; -00064 -00067 bool SetHostAddress(char* host, int port); -00068 -00069 public: -00070 -00075 char host[MAXBUF]; -00076 -00081 int port; -00082 -00087 std::vector<std::string> routes; -00088 -00089 -00092 bool MakeOutboundConnection(char* host, int port); -00093 -00096 std::string GetServerName(); -00097 -00100 void SetServerName(std::string serv); -00101 -00104 int GetDescriptor(); +00062 int fd; +00063 +00066 std::string servername; +00067 +00070 std::string description; +00071 +00075 int state; +00076 +00079 bool SetHostAddress(char* host, int port); +00080 +00081 public: +00082 +00087 char host[MAXBUF]; +00088 +00093 int port; +00094 +00099 std::vector<std::string> routes; +00100 +00101 +00104 bool MakeOutboundConnection(char* host, int port); 00105 -00108 void SetDescriptor(int fd); +00108 std::string GetServerName(); 00109 -00112 int GetState(); +00112 void SetServerName(std::string serv); 00113 -00116 void SetState(int state); +00116 int GetDescriptor(); 00117 -00120 char* GetServerIP(); +00120 void SetDescriptor(int fd); 00121 -00124 std::string GetDescription(); +00124 int GetState(); 00125 -00128 void SetDescription(std::string desc); +00128 void SetState(int state); 00129 -00135 int GetServerPort(); -00136 -00139 void SetServerPort(int p); -00140 -00143 bool SetHostAndPort(char* host, int port); -00144 -00148 void CloseConnection(); -00149 }; -00150 -00151 -00155 class packet : public classbase -00156 { -00157 }; -00158 -00161 class connection : public Extensible -00162 { -00163 public: -00166 int fd; -00167 -00170 char host[256]; -00171 -00174 char ip[32]; -00175 -00178 char inbuf[MAXBUF]; +00132 char* GetServerIP(); +00133 +00136 std::string GetDescription(); +00137 +00140 void SetDescription(std::string desc); +00141 +00147 int GetServerPort(); +00148 +00151 void SetServerPort(int p); +00152 +00155 bool SetHostAndPort(char* host, int port); +00156 +00160 void CloseConnection(); +00161 }; +00162 +00163 +00167 class packet : public classbase +00168 { +00169 }; +00170 +00173 class connection : public Extensible +00174 { +00175 public: +00178 int fd; 00179 -00182 long bytes_in; -00183 -00186 long bytes_out; -00187 -00190 long cmds_in; -00191 -00194 long cmds_out; +00182 char host[256]; +00183 +00186 char ip[32]; +00187 +00190 char inbuf[MAXBUF]; +00191 +00194 long bytes_in; 00195 -00198 bool haspassed; +00198 long bytes_out; 00199 -00204 int port; -00205 -00208 int registered; -00209 -00212 short int state; -00213 -00216 time_t lastping; +00202 long cmds_in; +00203 +00206 long cmds_out; +00207 +00210 bool haspassed; +00211 +00216 int port; 00217 -00220 time_t signon; +00220 int registered; 00221 -00224 time_t idle_lastmsg; +00224 short int state; 00225 -00228 time_t nping; +00228 time_t lastping; 00229 -00232 char internal_addr[MAXBUF]; +00232 time_t signon; 00233 -00236 int internal_port; -00237 -00241 std::vector<ircd_connector> connectors; -00242 -00245 connection(); -00246 -00249 bool CreateListener(char* host, int p); -00250 -00253 bool BeginLink(char* targethost, int port, char* password, char* servername, int myport); +00236 time_t idle_lastmsg; +00237 +00240 time_t nping; +00241 +00244 char internal_addr[MAXBUF]; +00245 +00248 int internal_port; +00249 +00253 std::vector<ircd_connector> connectors; 00254 -00257 bool MeshCookie(char* targethost, int port, long cookie, char* servername); +00257 connection(); 00258 -00261 void TerminateLink(char* targethost); +00261 bool CreateListener(char* host, int p); 00262 -00266 bool SendPacket(char *message, const char* host); -00267 -00272 bool RecvPacket(std::deque<std::string> &messages, char* host); -00273 -00276 ircd_connector* FindHost(std::string host); -00277 -00281 bool AddIncoming(int fd,char* targethost, int sourceport); -00282 -00285 long GenKey(); -00286 }; -00287 -00288 -00289 #endif -00290 -
Generated on Sat May 1 20:57:47 2004 for InspIRCd by +00265 bool BeginLink(char* targethost, int port, char* password, char* servername, int myport); +00266 +00269 bool MeshCookie(char* targethost, int port, long cookie, char* servername); +00270 +00273 void TerminateLink(char* targethost); +00274 +00278 bool SendPacket(char *message, const char* host); +00279 +00284 bool RecvPacket(std::deque<std::string> &messages, char* host); +00285 +00288 ircd_connector* FindHost(std::string host); +00289 +00293 bool AddIncoming(int fd,char* targethost, int sourceport); +00294 +00297 long GenKey(); +00298 }; +00299 +00300 +00301 #endif +00302 +