From bba97134e983541e94cf73e93900729e3a3e61fc Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Thu, 28 Oct 2021 17:46:54 +0300 Subject: Moving request limit control to libunit. Introducting application graceful stop. For now only used when application process reach request limit value. This closes #585 issue on GitHub. --- src/nxt_unit.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/nxt_unit.h') diff --git a/src/nxt_unit.h b/src/nxt_unit.h index 1e1a8dbe..484b7d56 100644 --- a/src/nxt_unit.h +++ b/src/nxt_unit.h @@ -136,7 +136,8 @@ struct nxt_unit_callbacks_s { int (*add_port)(nxt_unit_ctx_t *, nxt_unit_port_t *port); /* Remove previously added port. Optional. */ - void (*remove_port)(nxt_unit_t *, nxt_unit_port_t *port); + void (*remove_port)(nxt_unit_t *, nxt_unit_ctx_t *, + nxt_unit_port_t *port); /* Remove all data associated with process pid including ports. Optional. */ void (*remove_pid)(nxt_unit_t *, pid_t pid); @@ -167,6 +168,7 @@ struct nxt_unit_init_s { uint32_t request_data_size; uint32_t shm_limit; + uint32_t request_limit; nxt_unit_callbacks_t callbacks; @@ -215,8 +217,6 @@ int nxt_unit_run_shared(nxt_unit_ctx_t *ctx); nxt_unit_request_info_t *nxt_unit_dequeue_request(nxt_unit_ctx_t *ctx); -int nxt_unit_is_main_ctx(nxt_unit_ctx_t *ctx); - /* * Receive and process one message, invoke configured callbacks. * -- cgit From ff6a7053f500414dc74568a4e49adbac7f0cf634 Mon Sep 17 00:00:00 2001 From: Tiago Natel de Moura Date: Tue, 9 Nov 2021 15:48:44 +0300 Subject: Introduced SCM_CREDENTIALS / SCM_CREDS in the socket control msgs. --- src/nxt_unit.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nxt_unit.h') diff --git a/src/nxt_unit.h b/src/nxt_unit.h index 484b7d56..1b5280af 100644 --- a/src/nxt_unit.h +++ b/src/nxt_unit.h @@ -155,7 +155,7 @@ struct nxt_unit_callbacks_s { /* Receive data on port id. Optional. */ ssize_t (*port_recv)(nxt_unit_ctx_t *, nxt_unit_port_t *port, - void *buf, size_t buf_size, void *oob, size_t oob_size); + void *buf, size_t buf_size, void *oob, size_t *oob_size); int (*ready_handler)(nxt_unit_ctx_t *); }; -- cgit