summaryrefslogtreecommitdiff
path: root/src/fdevent_impl.h
Commit message (Collapse)AuthorAgeFilesLines
* [core] _WIN32 prefer WSAPoll()Glenn Strauss2023-05-031-3/+1
| | | | | | | | | | | | Note: TCP half-close is reported by WSAPoll() as POLLHUP event. (e.g. TCP half-close from shutdown(fd, SHUT_WR)) TODO: If performance tests of select() vs WSAPoll() do not show a a measurable difference, select() may be preferred over WSAPoll(). For now, make both "poll" and "select" available options in _WIN32. (On other platforms, lighttpd build does not built code to use select() when poll() is available on the platform.)
* [build] _WIN32 mingw buildGlenn Strauss2023-05-031-0/+3
| | | | use -lws2_32 instead of -lwsock32
* [core] _WIN32 rename __WIN32 to _WIN32Glenn Strauss2023-05-031-1/+1
|
* [core] _WIN32 alternative fdarray for WindowsGlenn Strauss2023-05-031-2/+13
| | | | | | | | | | | | | | | | | | | _WIN32 SOCKET (long long unsigned) handles are assigned differently from how POSIX allocates file descriptors (lowest number available). On _WIN32, the SOCKET descriptor should not be used to index an array of (fdnode *), so this commit provides an alternative method to store (fdnode *) for use by select() and by WSAPoll(). select(): commonly used unix select() idioms may be incorrect on _WIN32 https://devblogs.microsoft.com/oldnewthing/20221102-00/?p=107343 https://devblogs.microsoft.com/oldnewthing/20161221-00/?p=94985 WSAPoll(): https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-wsapoll As of Windows 10 version 2004, when a TCP socket fails to connect, (POLLHUP | POLLERR | POLLWRNORM) is indicated. (note: this was broken in WSAPoll() in all earlier Windows versions)
* [core] remove libev fdevent option (ignore)Glenn Strauss2022-12-031-10/+1
| | | | lighttpd directly uses native OS event handlers
* [core] Illumos epoll incompatible w/ lighttpd implGlenn Strauss2022-02-011-0/+2
| | | | | Illumos POLLRDHUP != EPOLLRDHUP; lighttpd implementation asserts() (since lighttpd implementation defines FDEVENT_RDHUP as POLLRDHUP)
* [core] merge fdevent impls into fdevent_impl.cGlenn Strauss2021-11-021-15/+0
|
* [core] omit fdevent select() code if poll() availGlenn Strauss2021-05-171-0/+2
| | | | | omit fdevent select() code if poll() avail translate server.event-handler = "select" to "poll" when poll available
* [core] isolate fdevent subsystemGlenn Strauss2020-07-081-1/+3
| | | | | | | fdevent.c no longer directly uses struct server *srv srv->srvconf.max_fds (if set) is used to set rlimits set max_conns in server.c after fdevent_init(), which sets srv->max_fds using srv->srvconf.max_fds (if set) as input hint
* [core] fdevent uses uint32_t instead of size_tGlenn Strauss2020-07-081-5/+5
|
* [core] pass (fdnode *) for registered fdevent fdGlenn Strauss2019-03-071-11/+0
| | | | | inline fdevent_fdnode_interest() avoid array lookup for (fdnode *) for various ops
* [core] some fdevent code streamliningGlenn Strauss2019-03-071-2/+10
| | | | isolate fde_ndx to fdevent framework internals
* [core] map FDEVENT_* to OS system event frameworksGlenn Strauss2019-02-171-26/+26
| | | | (avoid need to translate event flags between OS and lighttpd FDEVENT_*)
* [core] dispatch events from within event frameworkGlenn Strauss2019-02-131-5/+0
| | | | | | event framework now calls interface to dispatch events rather than itself implementing multiple interfaces for fdevent_process() to be able to dispatch events generically.
* [core] some header cleanupGlenn Strauss2018-04-081-1/+0
| | | | | | | | | provide standard types in first.h instead of base.h provide lighttpd types in base_decls.h instead of settings.h reduce headers exposed by headers for core data structures do not expose <pcre.h> or <stdlib.h> in headers move stat_cache_entry to stat_cache.h reduce use of "server.h" and "base.h" in headers
* [core] fix dup typedef compiler warningGlenn Strauss2017-11-071-2/+1
|
* [core] isolate backend fdevent handler defsGlenn Strauss2017-11-031-0/+156