Define HTTP_SERVER_POLL_CAPACITY and HTTP_CLIENT_POLL_CAPACITY so that users can easily allocate poll arrays of the right size

This commit is contained in:
2025-11-22 22:55:50 +01:00
parent 4ca5b67d8e
commit b881feb93a
3 changed files with 20 additions and 0 deletions
+10
View File
@@ -764,6 +764,11 @@ int http_create_test_certificate(HTTP_String C, HTTP_String O, HTTP_String CN,
#define HTTP_CLIENT_CAPACITY (1<<7)
#endif
// Maximum number of descriptors the client will want
// to wait on. It's one per connection plus the wakeup
// self-pipe.
#define HTTP_CLIENT_POLL_CAPACITY (HTTP_CLIENT_CAPACITY+1)
typedef enum {
HTTP_CLIENT_CONN_FREE,
HTTP_CLIENT_CONN_WAIT_LINE,
@@ -922,6 +927,11 @@ void http_free_response(HTTP_Response *response);
#define HTTP_SERVER_CAPACITY (1<<9)
#endif
// Maximum number of descriptors the server will want
// to wait on. It's one per connection plus two for the
// TCP and TLS listener, plus one for the wakeup self-pipe.
#define HTTP_SERVER_POLL_CAPACITY (HTTP_SERVER_CAPACITY+3)
typedef enum {
// This struct is unused