summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_port.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/nxt_port.h')
-rw-r--r--src/nxt_port.h23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/nxt_port.h b/src/nxt_port.h
index 76faa7d2..eeb6caa5 100644
--- a/src/nxt_port.h
+++ b/src/nxt_port.h
@@ -36,6 +36,12 @@ struct nxt_port_handlers_s {
/* Stop process command. */
nxt_port_handler_t quit;
+ /* Request headers. */
+ nxt_port_handler_t req_headers;
+
+ /* Websocket frame. */
+ nxt_port_handler_t websocket_frame;
+
/* Various data. */
nxt_port_handler_t data;
};
@@ -71,6 +77,9 @@ typedef enum {
_NXT_PORT_MSG_REMOVE_PID = nxt_port_handler_idx(remove_pid),
_NXT_PORT_MSG_QUIT = nxt_port_handler_idx(quit),
+ _NXT_PORT_MSG_REQ_HEADERS = nxt_port_handler_idx(req_headers),
+ _NXT_PORT_MSG_WEBSOCKET = nxt_port_handler_idx(websocket_frame),
+
_NXT_PORT_MSG_DATA = nxt_port_handler_idx(data),
NXT_PORT_MSG_MAX = sizeof(nxt_port_handlers_t)
@@ -99,6 +108,10 @@ typedef enum {
NXT_PORT_MSG_QUIT = _NXT_PORT_MSG_QUIT | NXT_PORT_MSG_LAST,
NXT_PORT_MSG_REMOVE_PID = _NXT_PORT_MSG_REMOVE_PID | NXT_PORT_MSG_LAST,
+ NXT_PORT_MSG_REQ_HEADERS = _NXT_PORT_MSG_REQ_HEADERS,
+ NXT_PORT_MSG_WEBSOCKET = _NXT_PORT_MSG_WEBSOCKET,
+ NXT_PORT_MSG_WEBSOCKET_LAST = _NXT_PORT_MSG_WEBSOCKET | NXT_PORT_MSG_LAST,
+
NXT_PORT_MSG_DATA = _NXT_PORT_MSG_DATA,
NXT_PORT_MSG_DATA_LAST = _NXT_PORT_MSG_DATA | NXT_PORT_MSG_LAST,
} nxt_port_msg_type_t;
@@ -134,11 +147,10 @@ typedef struct {
nxt_buf_t *buf;
size_t share;
nxt_fd_t fd;
- nxt_bool_t close_fd;
nxt_port_msg_t port_msg;
uint32_t tracking_msg[2];
-
- nxt_work_t work;
+ uint8_t close_fd; /* 1 bit */
+ uint8_t allocated; /* 1 bit */
} nxt_port_send_msg_t;
@@ -182,6 +194,8 @@ struct nxt_port_s {
uint32_t app_responses;
nxt_queue_t pending_requests;
+ nxt_queue_t active_websockets;
+
nxt_port_handler_t handler;
nxt_port_handler_t *data;
@@ -202,9 +216,6 @@ struct nxt_port_s {
nxt_atomic_t use_count;
nxt_process_type_t type;
-
- struct iovec *iov;
- void *mmsg_buf;
};