Skip to content

Commit

Permalink
Win32: added WSAPoll() support.
Browse files Browse the repository at this point in the history
WSAPoll() is only available with Windows Vista and newer (and only
available during compilation if _WIN32_WINNT >= 0x0600).  To make
sure the code works with Windows XP, we do not redefine _WIN32_WINNT,
but instead load WSAPoll() dynamically if it is not available during
compilation.

Also, sockets are not guaranteed to be small integers on Windows.
So an index array is used instead of NGX_USE_FD_EVENT to map
events to connections.
  • Loading branch information
mdounin committed Jan 24, 2019
1 parent c6a0003 commit 40b7447
Show file tree
Hide file tree
Showing 5 changed files with 512 additions and 0 deletions.
1 change: 1 addition & 0 deletions auto/os/win32
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ CORE_SRCS="$WIN32_SRCS $IOCP_SRCS"
OS_CONFIG="$WIN32_CONFIG"
NGX_ICONS="$NGX_WIN32_ICONS"
SELECT_SRCS=$WIN32_SELECT_SRCS
POLL_SRCS=$WIN32_POLL_SRCS

ngx_pic_opt=
ngx_binext=".exe"
Expand Down
1 change: 1 addition & 0 deletions auto/sources
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ WIN32_SELECT_SRCS=src/event/modules/ngx_win32_select_module.c

POLL_MODULE=ngx_poll_module
POLL_SRCS=src/event/modules/ngx_poll_module.c
WIN32_POLL_SRCS=src/event/modules/ngx_win32_poll_module.c

KQUEUE_MODULE=ngx_kqueue_module
KQUEUE_SRCS=src/event/modules/ngx_kqueue_module.c
Expand Down
Loading

0 comments on commit 40b7447

Please sign in to comment.