diff options
Diffstat (limited to 'src/include/microhttpd.h')
-rw-r--r-- | src/include/microhttpd.h | 45 |
1 files changed, 33 insertions, 12 deletions
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h index f87b675a..6f4e76a2 100644 --- a/src/include/microhttpd.h +++ b/src/include/microhttpd.h | |||
@@ -517,7 +517,7 @@ struct MHD_PostProcessor; | |||
517 | * @brief Flags for the `struct MHD_Daemon`. | 517 | * @brief Flags for the `struct MHD_Daemon`. |
518 | * | 518 | * |
519 | * Note that if neither #MHD_USE_THREAD_PER_CONNECTION nor | 519 | * Note that if neither #MHD_USE_THREAD_PER_CONNECTION nor |
520 | * #MHD_USE_SELECT_INTERNALLY is used, the client wants control over | 520 | * #MHD_USE_INTERNAL_POLLING_THREAD is used, the client wants control over |
521 | * the process and will call the appropriate microhttpd callbacks. | 521 | * the process and will call the appropriate microhttpd callbacks. |
522 | * | 522 | * |
523 | * Starting the daemon may also fail if a particular option is not | 523 | * Starting the daemon may also fail if a particular option is not |
@@ -557,9 +557,16 @@ enum MHD_FLAG | |||
557 | MHD_USE_THREAD_PER_CONNECTION = 4, | 557 | MHD_USE_THREAD_PER_CONNECTION = 4, |
558 | 558 | ||
559 | /** | 559 | /** |
560 | * Run using an internal thread (or thread pool) doing `select()`. | 560 | * Run using an internal thread (or thread pool) for sockets sending |
561 | * and receiving and data processing. | ||
561 | */ | 562 | */ |
563 | MHD_USE_INTERNAL_POLLING_THREAD = 8, | ||
564 | |||
565 | /** @deprecated */ | ||
562 | MHD_USE_SELECT_INTERNALLY = 8, | 566 | MHD_USE_SELECT_INTERNALLY = 8, |
567 | #define MHD_USE_SELECT_INTERNALLY \ | ||
568 | _MHD_DEPR_IN_MACRO("Value MHD_USE_SELECT_INTERNALLY is deprecated, use MHD_USE_INTERNAL_POLLING_THREAD instead") \ | ||
569 | MHD_USE_INTERNAL_POLLING_THREAD | ||
563 | 570 | ||
564 | /** | 571 | /** |
565 | * Run using the IPv6 protocol (otherwise, MHD will just support | 572 | * Run using the IPv6 protocol (otherwise, MHD will just support |
@@ -584,16 +591,24 @@ enum MHD_FLAG | |||
584 | /** | 591 | /** |
585 | * Use `poll()` instead of `select()`. This allows sockets with `fd >= | 592 | * Use `poll()` instead of `select()`. This allows sockets with `fd >= |
586 | * FD_SETSIZE`. This option is not compatible with using an | 593 | * FD_SETSIZE`. This option is not compatible with using an |
587 | * 'external' `select()` mode (as there is no API to get the file | 594 | * 'external' polling mode (as there is no API to get the file |
588 | * descriptors for the external select from MHD) and must also not | 595 | * descriptors for the external poll() from MHD) and must also not |
589 | * be used in combination with #MHD_USE_EPOLL. | 596 | * be used in combination with #MHD_USE_EPOLL. |
597 | * @sa ::MHD_FEATURE_POLL, #MHD_USE_POLL_INTERNAL_THREAD | ||
590 | */ | 598 | */ |
591 | MHD_USE_POLL = 64, | 599 | MHD_USE_POLL = 64, |
592 | 600 | ||
593 | /** | 601 | /** |
594 | * Run using an internal thread (or thread pool) doing `poll()`. | 602 | * Run using an internal thread (or thread pool) doing `poll()`. |
603 | * @sa ::MHD_FEATURE_POLL, #MHD_USE_POLL, #MHD_USE_INTERNAL_POLLING_THREAD | ||
595 | */ | 604 | */ |
596 | MHD_USE_POLL_INTERNALLY = MHD_USE_SELECT_INTERNALLY | MHD_USE_POLL, | 605 | MHD_USE_POLL_INTERNAL_THREAD = MHD_USE_POLL | MHD_USE_INTERNAL_POLLING_THREAD, |
606 | |||
607 | /** @deprecated */ | ||
608 | MHD_USE_POLL_INTERNALLY = MHD_USE_POLL | MHD_USE_INTERNAL_POLLING_THREAD, | ||
609 | #define MHD_USE_POLL_INTERNALLY \ | ||
610 | _MHD_DEPR_IN_MACRO("Value MHD_USE_POLL_INTERNALLY is deprecated, use MHD_USE_POLL_INTERNAL_THREAD instead") \ | ||
611 | MHD_USE_POLL_INTERNAL_THREAD | ||
597 | 612 | ||
598 | /** | 613 | /** |
599 | * Suppress (automatically) adding the 'Date:' header to HTTP responses. | 614 | * Suppress (automatically) adding the 'Date:' header to HTTP responses. |
@@ -633,15 +648,21 @@ enum MHD_FLAG | |||
633 | 648 | ||
634 | /** | 649 | /** |
635 | * Run using an internal thread (or thread pool) doing `epoll()`. | 650 | * Run using an internal thread (or thread pool) doing `epoll()`. |
636 | * This option is only available on Linux; using the option on | 651 | * This option is only available on certain platforms; using the option on |
637 | * non-Linux systems will cause #MHD_start_daemon to fail. | 652 | * platform without `epoll` support will cause #MHD_start_daemon to fail. |
653 | * @sa ::MHD_FEATURE_EPOLL, #MHD_USE_EPOLL, #MHD_USE_INTERNAL_POLLING_THREAD | ||
638 | */ | 654 | */ |
639 | MHD_USE_EPOLL_INTERNALLY = MHD_USE_SELECT_INTERNALLY | MHD_USE_EPOLL, | 655 | MHD_USE_EPOLL_INTERNAL_THREAD = MHD_USE_EPOLL | MHD_USE_INTERNAL_POLLING_THREAD, |
640 | 656 | ||
641 | /** @deprecated */ | 657 | /** @deprecated */ |
658 | MHD_USE_EPOLL_INTERNALLY = MHD_USE_EPOLL | MHD_USE_INTERNAL_POLLING_THREAD, | ||
659 | #define MHD_USE_EPOLL_INTERNALLY \ | ||
660 | _MHD_DEPR_IN_MACRO("Value MHD_USE_EPOLL_INTERNALLY is deprecated, use MHD_USE_EPOLL_INTERNAL_THREAD") \ | ||
661 | MHD_USE_EPOLL_INTERNAL_THREAD | ||
662 | /** @deprecated */ | ||
642 | #define MHD_USE_EPOLL_INTERNALLY_LINUX_ONLY \ | 663 | #define MHD_USE_EPOLL_INTERNALLY_LINUX_ONLY \ |
643 | _MHD_DEPR_IN_MACRO("Value MHD_USE_EPOLL_INTERNALLY_LINUX_ONLY is deprecated, use MHD_USE_EPOLL_INTERNALLY") \ | 664 | _MHD_DEPR_IN_MACRO("Value MHD_USE_EPOLL_INTERNALLY_LINUX_ONLY is deprecated, use MHD_USE_EPOLL_INTERNAL_THREAD") \ |
644 | MHD_USE_EPOLL_INTERNALLY | 665 | MHD_USE_EPOLL_INTERNAL_THREAD |
645 | 666 | ||
646 | /** | 667 | /** |
647 | * Use inter-thread communication channel. | 668 | * Use inter-thread communication channel. |
@@ -869,7 +890,7 @@ enum MHD_OPTION | |||
869 | * Number (`unsigned int`) of threads in thread pool. Enable | 890 | * Number (`unsigned int`) of threads in thread pool. Enable |
870 | * thread pooling by setting this value to to something | 891 | * thread pooling by setting this value to to something |
871 | * greater than 1. Currently, thread model must be | 892 | * greater than 1. Currently, thread model must be |
872 | * #MHD_USE_SELECT_INTERNALLY if thread pooling is enabled | 893 | * #MHD_USE_INTERNAL_POLLING_THREAD if thread pooling is enabled |
873 | * (#MHD_start_daemon returns NULL for an unsupported thread | 894 | * (#MHD_start_daemon returns NULL for an unsupported thread |
874 | * model). | 895 | * model). |
875 | */ | 896 | */ |
@@ -2795,7 +2816,7 @@ enum MHD_FEATURE | |||
2795 | /** | 2816 | /** |
2796 | * Get whether `epoll()` is supported. If supported then Flags | 2817 | * Get whether `epoll()` is supported. If supported then Flags |
2797 | * #MHD_USE_EPOLL and | 2818 | * #MHD_USE_EPOLL and |
2798 | * #MHD_USE_EPOLL_INTERNALLY can be used. | 2819 | * #MHD_USE_EPOLL_INTERNAL_THREAD can be used. |
2799 | */ | 2820 | */ |
2800 | MHD_FEATURE_EPOLL = 7, | 2821 | MHD_FEATURE_EPOLL = 7, |
2801 | 2822 | ||