summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_process.c
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_process.c
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 'src/nxt_process.c')
-rw-r--r--src/nxt_process.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/nxt_process.c b/src/nxt_process.c
index ce16cf7f..33af310d 100644
--- a/src/nxt_process.c
+++ b/src/nxt_process.c
@@ -540,3 +540,29 @@ nxt_process_port_new(nxt_process_t *process)
return port;
}
+
+void
+nxt_process_connected_port_add(nxt_process_t *process, nxt_port_t *port)
+{
+ /* TODO lock ports */
+
+ nxt_port_hash_add(&process->connected_ports, process->mem_pool, port);
+}
+
+void
+nxt_process_connected_port_remove(nxt_process_t *process, nxt_port_t *port)
+{
+ /* TODO lock ports */
+
+ nxt_port_hash_remove(&process->connected_ports, process->mem_pool, port);
+}
+
+nxt_port_t *
+nxt_process_connected_port_find(nxt_process_t *process, nxt_pid_t pid,
+ nxt_port_id_t port_id)
+{
+ /* TODO lock ports */
+
+ return nxt_port_hash_find(&process->connected_ports, pid, port_id);
+}
+