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:
@@ -764,6 +764,11 @@ int http_create_test_certificate(HTTP_String C, HTTP_String O, HTTP_String CN,
|
|||||||
#define HTTP_CLIENT_CAPACITY (1<<7)
|
#define HTTP_CLIENT_CAPACITY (1<<7)
|
||||||
#endif
|
#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 {
|
typedef enum {
|
||||||
HTTP_CLIENT_CONN_FREE,
|
HTTP_CLIENT_CONN_FREE,
|
||||||
HTTP_CLIENT_CONN_WAIT_LINE,
|
HTTP_CLIENT_CONN_WAIT_LINE,
|
||||||
@@ -922,6 +927,11 @@ void http_free_response(HTTP_Response *response);
|
|||||||
#define HTTP_SERVER_CAPACITY (1<<9)
|
#define HTTP_SERVER_CAPACITY (1<<9)
|
||||||
#endif
|
#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 {
|
typedef enum {
|
||||||
|
|
||||||
// This struct is unused
|
// This struct is unused
|
||||||
|
|||||||
@@ -5,6 +5,11 @@
|
|||||||
#define HTTP_CLIENT_CAPACITY (1<<7)
|
#define HTTP_CLIENT_CAPACITY (1<<7)
|
||||||
#endif
|
#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 {
|
typedef enum {
|
||||||
HTTP_CLIENT_CONN_FREE,
|
HTTP_CLIENT_CONN_FREE,
|
||||||
HTTP_CLIENT_CONN_WAIT_LINE,
|
HTTP_CLIENT_CONN_WAIT_LINE,
|
||||||
|
|||||||
@@ -5,6 +5,11 @@
|
|||||||
#define HTTP_SERVER_CAPACITY (1<<9)
|
#define HTTP_SERVER_CAPACITY (1<<9)
|
||||||
#endif
|
#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 {
|
typedef enum {
|
||||||
|
|
||||||
// This struct is unused
|
// This struct is unused
|
||||||
|
|||||||
Reference in New Issue
Block a user