From 03be04a9a2d86a4568d09d5e1689dd7ef37c863a Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 14 Dec 2005 14:52:12 +0000 Subject: Added extra docs for new config system git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2417 e03df62e-2008-0410-955e-edbf42e46eb7 --- docs/module-doc/socketengine_8cpp-source.html | 91 +++++++++++++-------------- 1 file changed, 44 insertions(+), 47 deletions(-) (limited to 'docs/module-doc/socketengine_8cpp-source.html') diff --git a/docs/module-doc/socketengine_8cpp-source.html b/docs/module-doc/socketengine_8cpp-source.html index a1281f8be..54fd76fc4 100644 --- a/docs/module-doc/socketengine_8cpp-source.html +++ b/docs/module-doc/socketengine_8cpp-source.html @@ -43,7 +43,7 @@ 00034 00035 SocketEngine::SocketEngine() 00036 { -00037 log(DEBUG,"SocketEngine::SocketEngine()"); +00037 log(DEBUG,"SocketEngine::SocketEngine()"); 00038 #ifdef USE_EPOLL 00039 EngineHandle = epoll_create(65535); 00040 #endif @@ -54,7 +54,7 @@ 00045 00046 SocketEngine::~SocketEngine() 00047 { -00048 log(DEBUG,"SocketEngine::~SocketEngine()"); +00048 log(DEBUG,"SocketEngine::~SocketEngine()"); 00049 #ifdef USE_EPOLL 00050 close(EngineHandle); 00051 #endif @@ -79,30 +79,30 @@ 00070 ref[fd] = type; 00071 if (readable) 00072 { -00073 log(DEBUG,"Set readbit"); +00073 log(DEBUG,"Set readbit"); 00074 ref[fd] |= X_READBIT; 00075 } -00076 log(DEBUG,"Add socket %d",fd); +00076 log(DEBUG,"Add socket %d",fd); 00077 #ifdef USE_EPOLL 00078 struct epoll_event ev; -00079 log(DEBUG,"epoll: Add socket to events, ep=%d socket=%d",EngineHandle,fd); +00079 log(DEBUG,"epoll: Add socket to events, ep=%d socket=%d",EngineHandle,fd); 00080 readable ? ev.events = EPOLLIN | EPOLLET : ev.events = EPOLLOUT | EPOLLET; 00081 ev.data.fd = fd; 00082 int i = epoll_ctl(EngineHandle, EPOLL_CTL_ADD, fd, &ev); 00083 if (i < 0) 00084 { -00085 log(DEBUG,"epoll: List insertion failure!"); +00085 log(DEBUG,"epoll: List insertion failure!"); 00086 return false; 00087 } 00088 #endif 00089 #ifdef USE_KQUEUE 00090 struct kevent ke; -00091 log(DEBUG,"kqueue: Add socket to events, kq=%d socket=%d",EngineHandle,fd); +00091 log(DEBUG,"kqueue: Add socket to events, kq=%d socket=%d",EngineHandle,fd); 00092 EV_SET(&ke, fd, readable ? EVFILT_READ : EVFILT_WRITE, EV_ADD, 0, 0, NULL); 00093 int i = kevent(EngineHandle, &ke, 1, 0, 0, NULL); 00094 if (i == -1) 00095 { -00096 log(DEBUG,"kqueue: List insertion failure!"); +00096 log(DEBUG,"kqueue: List insertion failure!"); 00097 return false; 00098 } 00099 #endif @@ -111,7 +111,7 @@ 00102 00103 bool SocketEngine::DelFd(int fd) 00104 { -00105 log(DEBUG,"SocketEngine::DelFd(%d)",fd); +00105 log(DEBUG,"SocketEngine::DelFd(%d)",fd); 00106 00107 if ((fd < 0) || (fd > 65535)) 00108 return false; @@ -122,18 +122,18 @@ 00113 if (*i == fd) 00114 { 00115 fds.erase(i); -00116 log(DEBUG,"Deleted fd %d",fd); +00116 log(DEBUG,"Deleted fd %d",fd); 00117 found = true; 00118 break; 00119 } 00120 } 00121 #ifdef USE_KQUEUE 00122 struct kevent ke; -00123 EV_SET(&ke, fd, ref[fd] && X_READBIT ? EVFILT_READ : EVFILT_WRITE, EV_DELETE, 0, 0, NULL); +00123 EV_SET(&ke, fd, ref[fd] & X_READBIT ? EVFILT_READ : EVFILT_WRITE, EV_DELETE, 0, 0, NULL); 00124 int i = kevent(EngineHandle, &ke, 1, 0, 0, NULL); 00125 if (i == -1) 00126 { -00127 log(DEBUG,"kqueue: Failed to remove socket from queue!"); +00127 log(DEBUG,"kqueue: Failed to remove socket from queue!"); 00128 return false; 00129 } 00130 #endif @@ -144,7 +144,7 @@ 00135 int i = epoll_ctl(EngineHandle, EPOLL_CTL_DEL, fd, &ev); 00136 if (i < 0) 00137 { -00138 log(DEBUG,"epoll: List deletion failure!"); +00138 log(DEBUG,"epoll: List deletion failure!"); 00139 return false; 00140 } 00141 #endif @@ -180,42 +180,39 @@ 00171 for (unsigned int a = 0; a < fds.size(); a++) 00172 { 00173 if ((FD_ISSET (fds[a], &rfdset)) || (FD_ISSET (fds[a], &wfdset))) -00174 { -00175 log(DEBUG,"...Adding active %d",fds[a]); -00176 fdlist.push_back(fds[a]); -00177 } -00178 } -00179 } -00180 #endif -00181 #ifdef USE_KQUEUE -00182 ts.tv_nsec = 10000L; -00183 ts.tv_sec = 0; -00184 int i = kevent(EngineHandle, NULL, 0, &ke_list[0], 65535, &ts); -00185 for (int j = 0; j < i; j++) -00186 fdlist.push_back(ke_list[j].ident); -00187 #endif -00188 #ifdef USE_EPOLL -00189 int i = epoll_wait(EngineHandle, events, 65535, 100); -00190 for (int j = 0; j < i; j++) -00191 fdlist.push_back(events[j].data.fd); -00192 #endif -00193 return true; -00194 } -00195 -00196 std::string SocketEngine::GetName() -00197 { -00198 #ifdef USE_SELECT -00199 return "select"; +00174 fdlist.push_back(fds[a]); +00175 } +00176 } +00177 #endif +00178 #ifdef USE_KQUEUE +00179 ts.tv_nsec = 10000L; +00180 ts.tv_sec = 0; +00181 int i = kevent(EngineHandle, NULL, 0, &ke_list[0], 65535, &ts); +00182 for (int j = 0; j < i; j++) +00183 fdlist.push_back(ke_list[j].ident); +00184 #endif +00185 #ifdef USE_EPOLL +00186 int i = epoll_wait(EngineHandle, events, 65535, 100); +00187 for (int j = 0; j < i; j++) +00188 fdlist.push_back(events[j].data.fd); +00189 #endif +00190 return true; +00191 } +00192 +00193 std::string SocketEngine::GetName() +00194 { +00195 #ifdef USE_SELECT +00196 return "select"; +00197 #endif +00198 #ifdef USE_KQUEUE +00199 return "kqueue"; 00200 #endif -00201 #ifdef USE_KQUEUE -00202 return "kqueue"; +00201 #ifdef USE_EPOLL +00202 return "epoll"; 00203 #endif -00204 #ifdef USE_EPOLL -00205 return "epoll"; -00206 #endif -00207 return "misconfigured"; -00208 } -
Generated on Mon Dec 12 18:30:58 2005 for InspIRCd by  +00204 return "misconfigured"; +00205 } +
Generated on Wed Dec 14 14:49:17 2005 for InspIRCd by  doxygen 1.4.4-20050815
-- cgit v1.2.3