From f62de63955ff77e800360eb140f108b5d2c6c075 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 19 Dec 2005 18:32:09 +0000 Subject: Design flaw my ass. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2580 e03df62e-2008-0410-955e-edbf42e46eb7 --- docs/module-doc/socket_8h-source.html | 121 ---------------------------------- 1 file changed, 121 deletions(-) delete mode 100644 docs/module-doc/socket_8h-source.html (limited to 'docs/module-doc/socket_8h-source.html') diff --git a/docs/module-doc/socket_8h-source.html b/docs/module-doc/socket_8h-source.html deleted file mode 100644 index 7c4beb64e..000000000 --- a/docs/module-doc/socket_8h-source.html +++ /dev/null @@ -1,121 +0,0 @@ - -
-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 #ifndef __INSP_SOCKET_H__ -00018 #define __INSP_SOCKET_H__ -00019 -00020 #include <sys/types.h> -00021 #include <sys/socket.h> -00022 #include <netinet/in.h> -00023 #include <sstream> -00024 #include <string> -00025 -00029 enum InspSocketState { I_DISCONNECTED, I_CONNECTING, I_CONNECTED, I_LISTENING, I_ERROR }; -00030 -00034 enum InspSocketError { I_ERR_TIMEOUT, I_ERR_SOCKET, I_ERR_CONNECT, I_ERR_BIND }; -00035 -00047 class InspSocket -00048 { -00049 private: -00050 -00054 int fd; -00055 -00059 std::string host; -00060 -00065 int port; -00066 -00072 InspSocketState state; -00073 -00078 sockaddr_in addr; -00079 -00084 in_addr addy; -00085 -00091 time_t timeout_end; -00092 -00097 bool timeout; -00098 -00106 char ibuf[65535]; -00107 -00111 std::string Buffer; -00112 -00118 std::string IP; -00119 -00124 sockaddr_in client; -00125 -00130 sockaddr_in server; -00131 -00136 socklen_t length; -00137 -00140 void FlushWriteBuffer(); -00141 -00142 public: -00143 -00148 InspSocket(); -00149 -00158 InspSocket(int newfd, char* ip); -00159 -00169 InspSocket(std::string host, int port, bool listening, unsigned long maxtime); -00170 -00176 virtual bool OnConnected(); -00177 -00184 virtual void OnError(InspSocketError e); -00185 -00190 virtual int OnDisconnect(); -00191 -00204 virtual bool OnDataReady(); -00205 -00213 virtual void OnTimeout(); -00214 -00223 virtual void OnClose(); -00224 -00230 virtual char* Read(); -00231 -00237 std::string GetIP(); -00238 -00245 bool Timeout(time_t current); -00246 -00252 virtual int Write(std::string data); -00253 -00267 virtual int OnIncomingConnection(int newfd, char* ip); -00268 -00274 void SetState(InspSocketState s); -00275 -00279 InspSocketState GetState(); -00280 -00289 bool Poll(); -00290 -00296 int GetFd(); -00297 -00303 virtual void Close(); -00304 -00310 virtual ~InspSocket(); -00311 }; -00312 -00313 #endif -
1.4.4-20050815
-
-
--
cgit v1.3.1-10-gc9f91