summaryrefslogtreecommitdiffhomepage
path: root/src/nodejs/unit-http/unit.h
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2019-12-24 18:04:17 +0300
committerMax Romanov <max.romanov@nginx.com>2019-12-24 18:04:17 +0300
commit763bdff4018ec35de8383273d366160adebb6021 (patch)
tree69da5e8b14c436142a84717851edbd00d84b0575 /src/nodejs/unit-http/unit.h
parentdf7caf465072e171f88358b9e69c65b76d8efd25 (diff)
downloadunit-763bdff4018ec35de8383273d366160adebb6021.tar.gz
unit-763bdff4018ec35de8383273d366160adebb6021.tar.bz2
Node.js: implementing output message drain using SHM_ACK feature.
ServerResponse.write() method tries to write data buffer using libunit and stores buffers to write in a Server-wide output queue, which is processed in response to SHM_ACK message from router. As a side effect 'drain' event implemented and socket.writable flag reflect current state.
Diffstat (limited to 'src/nodejs/unit-http/unit.h')
-rw-r--r--src/nodejs/unit-http/unit.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nodejs/unit-http/unit.h b/src/nodejs/unit-http/unit.h
index f5eaf9fd..18359118 100644
--- a/src/nodejs/unit-http/unit.h
+++ b/src/nodejs/unit-http/unit.h
@@ -36,6 +36,9 @@ private:
static void close_handler_cb(nxt_unit_request_info_t *req);
void close_handler(nxt_unit_request_info_t *req);
+ static void shm_ack_handler_cb(nxt_unit_ctx_t *ctx);
+ void shm_ack_handler(nxt_unit_ctx_t *ctx);
+
static int add_port(nxt_unit_ctx_t *ctx, nxt_unit_port_t *port);
static void remove_port(nxt_unit_ctx_t *ctx, nxt_unit_port_id_t *port_id);