libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 475b350b710463111893bf4b9deb3c8e5a1c62cc
parent f97d163b92f4fb1a4cafab420e376787e21730c2
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun, 30 Aug 2015 12:55:04 +0000

correct documentation as to when MHD_USE_EPOLL_LINUX_ONLY is allowed (previous formulation was wrong)

Diffstat:
MChangeLog | 4++++
Mdoc/libmicrohttpd.texi | 21+++++++++++----------
Msrc/include/microhttpd.h | 3++-
Msrc/microhttpd/daemon.c | 2+-
4 files changed, 18 insertions(+), 12 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,7 @@ +Sun Aug 30 14:53:51 CEST 2015 + Correct documentation as to when MHD_USE_EPOLL_LINUX_ONLY + is allowed. -CG + Thu Aug 27 09:38:44 CEST 2015 Reimplement monotonic clock functions for better support various platforms. diff --git a/doc/libmicrohttpd.texi b/doc/libmicrohttpd.texi @@ -487,9 +487,9 @@ production. @cindex FD_SETSIZE @cindex poll @cindex select -Use poll instead of select. This allows sockets with descriptors -@code{>= FD_SETSIZE}. This option currently only works in conjunction -with @code{MHD_USE_THREAD_PER_CONNECTION} or +Use @code{poll()} instead of @code{select()}. This allows sockets with +descriptors @code{>= FD_SETSIZE}. This option currently only works in +conjunction with @code{MHD_USE_THREAD_PER_CONNECTION} or @code{MHD_USE_INTERNAL_SELECT} (at this point). If you specify @code{MHD_USE_POLL} and the local platform does not support it, @code{MHD_start_daemon} will return NULL. @@ -498,15 +498,16 @@ with @code{MHD_USE_THREAD_PER_CONNECTION} or @cindex FD_SETSIZE @cindex epoll @cindex select -Use epoll instead of poll or select. This allows sockets with -descriptors @code{>= FD_SETSIZE}. This option is only available on -Linux systems and only works in conjunction with +Use @code{epoll()} instead of @code{poll()} or @code{select()}. This +allows sockets with descriptors @code{>= FD_SETSIZE}. This option is +only available on Linux systems and does not work in conjunction with @code{MHD_USE_THREAD_PER_CONNECTION} (at this point). If you specify @code{MHD_USE_EPOLL_LINUX_ONLY} and the local platform does not -support it, @code{MHD_start_daemon} will return NULL. Using epoll -instead of select or poll can in some situations result in significantly -higher performance as the system call has fundamentally lower complexity -(O(1) for epoll vs. O(n) for select/poll where n is the number of +support it, @code{MHD_start_daemon} will return NULL. Using +@code{epoll()} instead of @code{select()} or @code{poll()} can in some +situations result in significantly higher performance as the system +call has fundamentally lower complexity (O(1) for @code{epoll()} +vs. O(n) for @code{select()}/@code{poll()} where n is the number of open connections). @item MHD_SUPPRESS_DATE_NO_CLOCK diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h @@ -581,7 +581,8 @@ enum MHD_FLAG /** * Use `epoll()` instead of `select()` or `poll()` for the event loop. * This option is only available on Linux; using the option on - * non-Linux systems will cause #MHD_start_daemon to fail. + * non-Linux systems will cause #MHD_start_daemon to fail. Using + * this option is not supported with MHD_USE_THREAD_PER_CONNECTION. */ MHD_USE_EPOLL_LINUX_ONLY = 512, diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c @@ -4237,7 +4237,7 @@ MHD_start_daemon_va (unsigned int flags, { #if HAVE_MESSAGES MHD_DLOG (daemon, - "file descriptor for worker control pipe exceeds maximum value\n"); + "File descriptor for worker control pipe exceeds maximum value\n"); #endif if (0 != MHD_pipe_close_ (d->wpipe[0])) MHD_PANIC ("close failed\n");