summaryrefslogtreecommitdiff
path: root/docs/module-doc/socketengine_8cpp-source.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/module-doc/socketengine_8cpp-source.html')
-rw-r--r--docs/module-doc/socketengine_8cpp-source.html91
1 files changed, 44 insertions, 47 deletions
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 @@
<a name="l00034"></a>00034
<a name="l00035"></a><a class="code" href="classSocketEngine.html#SocketEngine_28_29">00035</a> <a class="code" href="classSocketEngine.html#SocketEngine_28_29">SocketEngine::SocketEngine</a>()
<a name="l00036"></a>00036 {
-<a name="l00037"></a>00037 log(<a class="code" href="modules_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"SocketEngine::SocketEngine()"</span>);
+<a name="l00037"></a>00037 log(<a class="code" href="inspircd__io_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"SocketEngine::SocketEngine()"</span>);
<a name="l00038"></a>00038 <span class="preprocessor">#ifdef USE_EPOLL</span>
<a name="l00039"></a>00039 <span class="preprocessor"></span> <a class="code" href="classSocketEngine.html#EngineHandle">EngineHandle</a> = epoll_create(65535);
<a name="l00040"></a>00040 <span class="preprocessor">#endif</span>
@@ -54,7 +54,7 @@
<a name="l00045"></a>00045
<a name="l00046"></a><a class="code" href="classSocketEngine.html#_7ESocketEngine_28_29">00046</a> <a class="code" href="classSocketEngine.html#_7ESocketEngine_28_29">SocketEngine::~SocketEngine</a>()
<a name="l00047"></a>00047 {
-<a name="l00048"></a>00048 log(<a class="code" href="modules_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"SocketEngine::~SocketEngine()"</span>);
+<a name="l00048"></a>00048 log(<a class="code" href="inspircd__io_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"SocketEngine::~SocketEngine()"</span>);
<a name="l00049"></a>00049 <span class="preprocessor">#ifdef USE_EPOLL</span>
<a name="l00050"></a>00050 <span class="preprocessor"></span> close(<a class="code" href="classSocketEngine.html#EngineHandle">EngineHandle</a>);
<a name="l00051"></a>00051 <span class="preprocessor">#endif</span>
@@ -79,30 +79,30 @@
<a name="l00070"></a>00070 <a class="code" href="socketengine_8cpp.html#ref_5B_36_35_35_33_35_5D">ref</a>[fd] = type;
<a name="l00071"></a>00071 <span class="keywordflow">if</span> (readable)
<a name="l00072"></a>00072 {
-<a name="l00073"></a>00073 log(<a class="code" href="modules_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"Set readbit"</span>);
+<a name="l00073"></a>00073 log(<a class="code" href="inspircd__io_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"Set readbit"</span>);
<a name="l00074"></a>00074 <a class="code" href="socketengine_8cpp.html#ref_5B_36_35_35_33_35_5D">ref</a>[fd] |= <a class="code" href="socketengine_8h.html#X_5FREADBIT">X_READBIT</a>;
<a name="l00075"></a>00075 }
-<a name="l00076"></a>00076 log(<a class="code" href="modules_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"Add socket %d"</span>,fd);
+<a name="l00076"></a>00076 log(<a class="code" href="inspircd__io_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"Add socket %d"</span>,fd);
<a name="l00077"></a>00077 <span class="preprocessor">#ifdef USE_EPOLL</span>
<a name="l00078"></a>00078 <span class="preprocessor"></span> <span class="keyword">struct </span>epoll_event ev;
-<a name="l00079"></a>00079 log(<a class="code" href="modules_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"epoll: Add socket to events, ep=%d socket=%d"</span>,<a class="code" href="classSocketEngine.html#EngineHandle">EngineHandle</a>,fd);
+<a name="l00079"></a>00079 log(<a class="code" href="inspircd__io_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"epoll: Add socket to events, ep=%d socket=%d"</span>,<a class="code" href="classSocketEngine.html#EngineHandle">EngineHandle</a>,fd);
<a name="l00080"></a>00080 readable ? ev.events = EPOLLIN | EPOLLET : ev.events = EPOLLOUT | EPOLLET;
<a name="l00081"></a>00081 ev.data.fd = fd;
<a name="l00082"></a>00082 <span class="keywordtype">int</span> i = epoll_ctl(<a class="code" href="classSocketEngine.html#EngineHandle">EngineHandle</a>, EPOLL_CTL_ADD, fd, &amp;ev);
<a name="l00083"></a>00083 <span class="keywordflow">if</span> (i &lt; 0)
<a name="l00084"></a>00084 {
-<a name="l00085"></a>00085 log(<a class="code" href="modules_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"epoll: List insertion failure!"</span>);
+<a name="l00085"></a>00085 log(<a class="code" href="inspircd__io_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"epoll: List insertion failure!"</span>);
<a name="l00086"></a>00086 <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00087"></a>00087 }
<a name="l00088"></a>00088 <span class="preprocessor">#endif</span>
<a name="l00089"></a>00089 <span class="preprocessor"></span><span class="preprocessor">#ifdef USE_KQUEUE</span>
<a name="l00090"></a>00090 <span class="preprocessor"></span> <span class="keyword">struct </span>kevent ke;
-<a name="l00091"></a>00091 log(<a class="code" href="modules_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"kqueue: Add socket to events, kq=%d socket=%d"</span>,<a class="code" href="classSocketEngine.html#EngineHandle">EngineHandle</a>,fd);
+<a name="l00091"></a>00091 log(<a class="code" href="inspircd__io_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"kqueue: Add socket to events, kq=%d socket=%d"</span>,<a class="code" href="classSocketEngine.html#EngineHandle">EngineHandle</a>,fd);
<a name="l00092"></a>00092 EV_SET(&amp;ke, fd, readable ? EVFILT_READ : EVFILT_WRITE, EV_ADD, 0, 0, NULL);
<a name="l00093"></a>00093 <span class="keywordtype">int</span> i = kevent(<a class="code" href="classSocketEngine.html#EngineHandle">EngineHandle</a>, &amp;ke, 1, 0, 0, NULL);
<a name="l00094"></a>00094 <span class="keywordflow">if</span> (i == -1)
<a name="l00095"></a>00095 {
-<a name="l00096"></a>00096 log(<a class="code" href="modules_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"kqueue: List insertion failure!"</span>);
+<a name="l00096"></a>00096 log(<a class="code" href="inspircd__io_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"kqueue: List insertion failure!"</span>);
<a name="l00097"></a>00097 <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00098"></a>00098 }
<a name="l00099"></a>00099 <span class="preprocessor">#endif</span>
@@ -111,7 +111,7 @@
<a name="l00102"></a>00102
<a name="l00103"></a><a class="code" href="classSocketEngine.html#DelFd_28int_20fd_29">00103</a> <span class="keywordtype">bool</span> <a class="code" href="classSocketEngine.html#DelFd_28int_20fd_29">SocketEngine::DelFd</a>(<span class="keywordtype">int</span> fd)
<a name="l00104"></a>00104 {
-<a name="l00105"></a>00105 log(<a class="code" href="modules_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"SocketEngine::DelFd(%d)"</span>,fd);
+<a name="l00105"></a>00105 log(<a class="code" href="inspircd__io_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"SocketEngine::DelFd(%d)"</span>,fd);
<a name="l00106"></a>00106
<a name="l00107"></a>00107 <span class="keywordflow">if</span> ((fd &lt; 0) || (fd &gt; 65535))
<a name="l00108"></a>00108 <span class="keywordflow">return</span> <span class="keyword">false</span>;
@@ -122,18 +122,18 @@
<a name="l00113"></a>00113 <span class="keywordflow">if</span> (*i == fd)
<a name="l00114"></a>00114 {
<a name="l00115"></a>00115 <a class="code" href="classSocketEngine.html#fds">fds</a>.erase(i);
-<a name="l00116"></a>00116 log(<a class="code" href="modules_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"Deleted fd %d"</span>,fd);
+<a name="l00116"></a>00116 log(<a class="code" href="inspircd__io_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"Deleted fd %d"</span>,fd);
<a name="l00117"></a>00117 found = <span class="keyword">true</span>;
<a name="l00118"></a>00118 <span class="keywordflow">break</span>;
<a name="l00119"></a>00119 }
<a name="l00120"></a>00120 }
<a name="l00121"></a>00121 <span class="preprocessor">#ifdef USE_KQUEUE</span>
<a name="l00122"></a>00122 <span class="preprocessor"></span> <span class="keyword">struct </span>kevent ke;
-<a name="l00123"></a>00123 EV_SET(&amp;ke, fd, <a class="code" href="socketengine_8cpp.html#ref_5B_36_35_35_33_35_5D">ref</a>[fd] &amp;&amp; <a class="code" href="socketengine_8h.html#X_5FREADBIT">X_READBIT</a> ? EVFILT_READ : EVFILT_WRITE, EV_DELETE, 0, 0, NULL);
+<a name="l00123"></a>00123 EV_SET(&amp;ke, fd, <a class="code" href="socketengine_8cpp.html#ref_5B_36_35_35_33_35_5D">ref</a>[fd] &amp; <a class="code" href="socketengine_8h.html#X_5FREADBIT">X_READBIT</a> ? EVFILT_READ : EVFILT_WRITE, EV_DELETE, 0, 0, NULL);
<a name="l00124"></a>00124 <span class="keywordtype">int</span> i = kevent(<a class="code" href="classSocketEngine.html#EngineHandle">EngineHandle</a>, &amp;ke, 1, 0, 0, NULL);
<a name="l00125"></a>00125 <span class="keywordflow">if</span> (i == -1)
<a name="l00126"></a>00126 {
-<a name="l00127"></a>00127 log(<a class="code" href="modules_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"kqueue: Failed to remove socket from queue!"</span>);
+<a name="l00127"></a>00127 log(<a class="code" href="inspircd__io_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"kqueue: Failed to remove socket from queue!"</span>);
<a name="l00128"></a>00128 <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00129"></a>00129 }
<a name="l00130"></a>00130 <span class="preprocessor">#endif</span>
@@ -144,7 +144,7 @@
<a name="l00135"></a>00135 <span class="keywordtype">int</span> i = epoll_ctl(<a class="code" href="classSocketEngine.html#EngineHandle">EngineHandle</a>, EPOLL_CTL_DEL, fd, &amp;ev);
<a name="l00136"></a>00136 <span class="keywordflow">if</span> (i &lt; 0)
<a name="l00137"></a>00137 {
-<a name="l00138"></a>00138 log(<a class="code" href="modules_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"epoll: List deletion failure!"</span>);
+<a name="l00138"></a>00138 log(<a class="code" href="inspircd__io_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"epoll: List deletion failure!"</span>);
<a name="l00139"></a>00139 <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00140"></a>00140 }
<a name="l00141"></a>00141 <span class="preprocessor">#endif</span>
@@ -180,42 +180,39 @@
<a name="l00171"></a>00171 <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> a = 0; a &lt; <a class="code" href="classSocketEngine.html#fds">fds</a>.size(); a++)
<a name="l00172"></a>00172 {
<a name="l00173"></a>00173 <span class="keywordflow">if</span> ((FD_ISSET (<a class="code" href="classSocketEngine.html#fds">fds</a>[a], &amp;rfdset)) || (FD_ISSET (<a class="code" href="classSocketEngine.html#fds">fds</a>[a], &amp;wfdset)))
-<a name="l00174"></a>00174 {
-<a name="l00175"></a>00175 log(<a class="code" href="modules_8h.html#DEBUG">DEBUG</a>,<span class="stringliteral">"...Adding active %d"</span>,<a class="code" href="classSocketEngine.html#fds">fds</a>[a]);
-<a name="l00176"></a>00176 fdlist.push_back(<a class="code" href="classSocketEngine.html#fds">fds</a>[a]);
-<a name="l00177"></a>00177 }
-<a name="l00178"></a>00178 }
-<a name="l00179"></a>00179 }
-<a name="l00180"></a>00180 <span class="preprocessor">#endif</span>
-<a name="l00181"></a>00181 <span class="preprocessor"></span><span class="preprocessor">#ifdef USE_KQUEUE</span>
-<a name="l00182"></a>00182 <span class="preprocessor"></span> <a class="code" href="classSocketEngine.html#ts">ts</a>.tv_nsec = 10000L;
-<a name="l00183"></a>00183 <a class="code" href="classSocketEngine.html#ts">ts</a>.tv_sec = 0;
-<a name="l00184"></a>00184 <span class="keywordtype">int</span> i = kevent(<a class="code" href="classSocketEngine.html#EngineHandle">EngineHandle</a>, NULL, 0, &amp;<a class="code" href="classSocketEngine.html#ke_5Flist_5B_36_35_35_33_35_5D">ke_list</a>[0], 65535, &amp;<a class="code" href="classSocketEngine.html#ts">ts</a>);
-<a name="l00185"></a>00185 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j &lt; i; j++)
-<a name="l00186"></a>00186 fdlist.push_back(<a class="code" href="classSocketEngine.html#ke_5Flist_5B_36_35_35_33_35_5D">ke_list</a>[j].ident);
-<a name="l00187"></a>00187 <span class="preprocessor">#endif</span>
-<a name="l00188"></a>00188 <span class="preprocessor"></span><span class="preprocessor">#ifdef USE_EPOLL</span>
-<a name="l00189"></a>00189 <span class="preprocessor"></span> <span class="keywordtype">int</span> i = epoll_wait(<a class="code" href="classSocketEngine.html#EngineHandle">EngineHandle</a>, events, 65535, 100);
-<a name="l00190"></a>00190 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j &lt; i; j++)
-<a name="l00191"></a>00191 fdlist.push_back(events[j].data.fd);
-<a name="l00192"></a>00192 <span class="preprocessor">#endif</span>
-<a name="l00193"></a>00193 <span class="preprocessor"></span> <span class="keywordflow">return</span> <span class="keyword">true</span>;
-<a name="l00194"></a>00194 }
-<a name="l00195"></a>00195
-<a name="l00196"></a><a class="code" href="classSocketEngine.html#GetName_28_29">00196</a> <a class="code" href="namespaceirc.html#string">std::string</a> <a class="code" href="classSocketEngine.html#GetName_28_29">SocketEngine::GetName</a>()
-<a name="l00197"></a>00197 {
-<a name="l00198"></a>00198 <span class="preprocessor">#ifdef USE_SELECT</span>
-<a name="l00199"></a>00199 <span class="preprocessor"></span> <span class="keywordflow">return</span> <span class="stringliteral">"select"</span>;
+<a name="l00174"></a>00174 fdlist.push_back(<a class="code" href="classSocketEngine.html#fds">fds</a>[a]);
+<a name="l00175"></a>00175 }
+<a name="l00176"></a>00176 }
+<a name="l00177"></a>00177 <span class="preprocessor">#endif</span>
+<a name="l00178"></a>00178 <span class="preprocessor"></span><span class="preprocessor">#ifdef USE_KQUEUE</span>
+<a name="l00179"></a>00179 <span class="preprocessor"></span> <a class="code" href="classSocketEngine.html#ts">ts</a>.tv_nsec = 10000L;
+<a name="l00180"></a>00180 <a class="code" href="classSocketEngine.html#ts">ts</a>.tv_sec = 0;
+<a name="l00181"></a>00181 <span class="keywordtype">int</span> i = kevent(<a class="code" href="classSocketEngine.html#EngineHandle">EngineHandle</a>, NULL, 0, &amp;<a class="code" href="classSocketEngine.html#ke_5Flist_5B_36_35_35_33_35_5D">ke_list</a>[0], 65535, &amp;<a class="code" href="classSocketEngine.html#ts">ts</a>);
+<a name="l00182"></a>00182 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j &lt; i; j++)
+<a name="l00183"></a>00183 fdlist.push_back(<a class="code" href="classSocketEngine.html#ke_5Flist_5B_36_35_35_33_35_5D">ke_list</a>[j].ident);
+<a name="l00184"></a>00184 <span class="preprocessor">#endif</span>
+<a name="l00185"></a>00185 <span class="preprocessor"></span><span class="preprocessor">#ifdef USE_EPOLL</span>
+<a name="l00186"></a>00186 <span class="preprocessor"></span> <span class="keywordtype">int</span> i = epoll_wait(<a class="code" href="classSocketEngine.html#EngineHandle">EngineHandle</a>, events, 65535, 100);
+<a name="l00187"></a>00187 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j &lt; i; j++)
+<a name="l00188"></a>00188 fdlist.push_back(events[j].data.fd);
+<a name="l00189"></a>00189 <span class="preprocessor">#endif</span>
+<a name="l00190"></a>00190 <span class="preprocessor"></span> <span class="keywordflow">return</span> <span class="keyword">true</span>;
+<a name="l00191"></a>00191 }
+<a name="l00192"></a>00192
+<a name="l00193"></a><a class="code" href="classSocketEngine.html#GetName_28_29">00193</a> <a class="code" href="namespaceirc.html#string">std::string</a> <a class="code" href="classSocketEngine.html#GetName_28_29">SocketEngine::GetName</a>()
+<a name="l00194"></a>00194 {
+<a name="l00195"></a>00195 <span class="preprocessor">#ifdef USE_SELECT</span>
+<a name="l00196"></a>00196 <span class="preprocessor"></span> <span class="keywordflow">return</span> <span class="stringliteral">"select"</span>;
+<a name="l00197"></a>00197 <span class="preprocessor">#endif</span>
+<a name="l00198"></a>00198 <span class="preprocessor"></span><span class="preprocessor">#ifdef USE_KQUEUE</span>
+<a name="l00199"></a>00199 <span class="preprocessor"></span> <span class="keywordflow">return</span> <span class="stringliteral">"kqueue"</span>;
<a name="l00200"></a>00200 <span class="preprocessor">#endif</span>
-<a name="l00201"></a>00201 <span class="preprocessor"></span><span class="preprocessor">#ifdef USE_KQUEUE</span>
-<a name="l00202"></a>00202 <span class="preprocessor"></span> <span class="keywordflow">return</span> <span class="stringliteral">"kqueue"</span>;
+<a name="l00201"></a>00201 <span class="preprocessor"></span><span class="preprocessor">#ifdef USE_EPOLL</span>
+<a name="l00202"></a>00202 <span class="preprocessor"></span> <span class="keywordflow">return</span> <span class="stringliteral">"epoll"</span>;
<a name="l00203"></a>00203 <span class="preprocessor">#endif</span>
-<a name="l00204"></a>00204 <span class="preprocessor"></span><span class="preprocessor">#ifdef USE_EPOLL</span>
-<a name="l00205"></a>00205 <span class="preprocessor"></span> <span class="keywordflow">return</span> <span class="stringliteral">"epoll"</span>;
-<a name="l00206"></a>00206 <span class="preprocessor">#endif</span>
-<a name="l00207"></a>00207 <span class="preprocessor"></span> <span class="keywordflow">return</span> <span class="stringliteral">"misconfigured"</span>;
-<a name="l00208"></a>00208 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Dec 12 18:30:58 2005 for InspIRCd by&nbsp;
+<a name="l00204"></a>00204 <span class="preprocessor"></span> <span class="keywordflow">return</span> <span class="stringliteral">"misconfigured"</span>;
+<a name="l00205"></a>00205 }
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Wed Dec 14 14:49:17 2005 for InspIRCd by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4-20050815 </small></address>
</body>