diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2023-02-03 16:19:13 -0500 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2023-05-03 23:11:34 -0400 |
commit | 651e0d216c0c67051f2b3e15ecb998333b9fb91e (patch) | |
tree | d91ca825f40cb3d51ca81fd97ef0e92488619291 /src | |
parent | a3bf0cd22e09a41a595f090e940b3485827af65d (diff) | |
download | lighttpd-git-651e0d216c0c67051f2b3e15ecb998333b9fb91e.tar.gz |
[core] _WIN32 prefer WSAPoll()
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.)
Diffstat (limited to 'src')
-rw-r--r-- | src/fdevent_impl.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/fdevent_impl.h b/src/fdevent_impl.h index b6ffef4c..e2fa094f 100644 --- a/src/fdevent_impl.h +++ b/src/fdevent_impl.h @@ -16,14 +16,12 @@ struct epoll_event; /* declaration */ struct pollfd; /* declaration */ #endif -#if 0 /*(disabled; needs further development for stability of results)*/ #ifdef _WIN32 # define FDEVENT_USE_POLL struct pollfd; /* declaration */ #endif -#endif -#ifndef FDEVENT_USE_POLL +#if !defined(FDEVENT_USE_POLL) || defined(_WIN32) #if defined HAVE_SELECT # ifdef _WIN32 # ifdef _MSC_VER |