summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_conn.h
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2017-06-23 19:20:08 +0300
committerMax Romanov <max.romanov@nginx.com>2017-06-23 19:20:08 +0300
commitb8f126dcdfdf04bb01b70f9590fc64b3e155e119 (patch)
tree49fc84fb72e1483103c639e5c394820d8127223f /src/nxt_conn.h
parent4a1b59c27a8e85fc3b03c420fbc1642ce52e96cf (diff)
downloadunit-b8f126dcdfdf04bb01b70f9590fc64b3e155e119.tar.gz
unit-b8f126dcdfdf04bb01b70f9590fc64b3e155e119.tar.bz2
Added basic HTTP request processing in router.
- request to connection mapping in engine; - requests queue in connection; - engine port creation; - connected ports hash for each process; - engine port data messages processing (app responses);
Diffstat (limited to '')
-rw-r--r--src/nxt_conn.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/nxt_conn.h b/src/nxt_conn.h
index 479450bb..6c4de090 100644
--- a/src/nxt_conn.h
+++ b/src/nxt_conn.h
@@ -141,6 +141,8 @@ struct nxt_conn_s {
nxt_conn_io_t *io;
+ nxt_queue_t requests; /* of nxt_req_conn_link_t */
+
#if (NXT_SSLTLS || NXT_THREADS)
/* SunC does not support "zero-sized struct/union". */
@@ -180,6 +182,16 @@ struct nxt_conn_s {
};
+typedef uint32_t nxt_req_id_t;
+
+typedef struct {
+ nxt_req_id_t req_id;
+ nxt_conn_t *conn;
+
+ nxt_queue_link_t link;
+} nxt_req_conn_link_t;
+
+
#define nxt_conn_timer_init(ev, c, wq) \
do { \
(ev)->work_queue = (wq); \
@@ -347,4 +359,10 @@ NXT_EXPORT void nxt_conn_proxy(nxt_task_t *task, nxt_conn_proxy_t *p);
#define nxt_event_conn_close nxt_conn_close
+NXT_EXPORT nxt_req_conn_link_t *nxt_conn_request_add(nxt_conn_t *c,
+ nxt_req_id_t req_id);
+NXT_EXPORT void nxt_conn_request_remove(nxt_conn_t *c,
+ nxt_req_conn_link_t *rc);
+
+
#endif /* _NXT_CONN_H_INCLUDED_ */