From 4d6d3859d208d5576e7149de9a0a5576b7cf5153 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 12 Dec 2005 18:31:52 +0000 Subject: Added extra documentation for InspSocket (at last) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2356 e03df62e-2008-0410-955e-edbf42e46eb7 --- docs/module-doc/socket_8h-source.html | 130 +++++++++++++++++++++------------- 1 file changed, 82 insertions(+), 48 deletions(-) (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 index 3f5815e6c..21535c883 100644 --- a/docs/module-doc/socket_8h-source.html +++ b/docs/module-doc/socket_8h-source.html @@ -29,54 +29,88 @@ 00020 #include <sys/types.h> 00021 #include <sys/socket.h> 00022 #include <netinet/in.h> -00023 #include <poll.h> -00024 #include <sstream> -00025 #include <string> -00026 -00027 enum InspSocketState { I_DISCONNECTED, I_CONNECTING, I_CONNECTED, I_LISTENING, I_ERROR }; -00028 enum InspSocketError { I_ERR_TIMEOUT, I_ERR_SOCKET, I_ERR_CONNECT, I_ERR_BIND }; -00029 -00030 class InspSocket -00031 { -00032 private: -00033 int fd; -00034 std::string host; -00035 int port; -00036 InspSocketState state; -00037 sockaddr_in addr; -00038 in_addr addy; -00039 time_t timeout_end; -00040 bool timeout; -00041 pollfd polls; -00042 char ibuf[16384]; -00043 std::string IP; -00044 sockaddr_in client; -00045 sockaddr_in server; -00046 socklen_t length; -00047 public: -00048 InspSocket(); -00049 InspSocket(int newfd, char* ip); -00050 InspSocket(std::string host, int port, bool listening, unsigned long maxtime); -00051 virtual bool OnConnected(); -00052 virtual void OnError(InspSocketError e); -00053 virtual int OnDisconnect(); -00054 virtual bool OnDataReady(); -00055 virtual void OnTimeout(); -00056 virtual void OnClose(); -00057 virtual char* Read(); -00058 std::string GetIP(); -00059 virtual int Write(std::string data); -00060 virtual int OnIncomingConnection(int newfd, char* ip); -00061 void SetState(InspSocketState s); -00062 InspSocketState GetState(); -00063 bool Poll(); -00064 int GetFd(); -00065 virtual void Close(); -00066 virtual ~InspSocket(); -00067 }; -00068 -00069 #endif -
Generated on Mon Dec 12 13:31:08 2005 for InspIRCd by  +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[16384]; +00107 +00113 std::string IP; +00114 +00119 sockaddr_in client; +00120 +00125 sockaddr_in server; +00126 +00131 socklen_t length; +00132 +00133 public: +00134 +00139 InspSocket(); +00140 +00149 InspSocket(int newfd, char* ip); +00150 +00160 InspSocket(std::string host, int port, bool listening, unsigned long maxtime); +00161 +00167 virtual bool OnConnected(); +00168 +00175 virtual void OnError(InspSocketError e); +00176 +00181 virtual int OnDisconnect(); +00182 +00195 virtual bool OnDataReady(); +00196 +00204 virtual void OnTimeout(); +00205 +00214 virtual void OnClose(); +00215 +00221 virtual char* Read(); +00222 +00228 std::string GetIP(); +00229 +00236 bool Timeout(time_t current); +00237 +00243 virtual int Write(std::string data); +00244 +00258 virtual int OnIncomingConnection(int newfd, char* ip); +00259 +00265 void SetState(InspSocketState s); +00266 +00270 InspSocketState GetState(); +00271 +00280 bool Poll(); +00281 +00287 int GetFd(); +00288 +00294 virtual void Close(); +00295 +00301 virtual ~InspSocket(); +00302 }; +00303 +00304 #endif +
Generated on Mon Dec 12 18:30:58 2005 for InspIRCd by  doxygen 1.4.4-20050815
-- cgit v1.2.3