nxt_router.h (428:b5c8e9dc6646) nxt_router.h (431:5817734dd9b9)
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#ifndef _NXT_ROUTER_H_INCLUDED_
8#define _NXT_ROUTER_H_INCLUDED_
9
10
11#include <nxt_main.h>
12#include <nxt_runtime.h>
13#include <nxt_main_process.h>
14#include <nxt_application.h>
15
16
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#ifndef _NXT_ROUTER_H_INCLUDED_
8#define _NXT_ROUTER_H_INCLUDED_
9
10
11#include <nxt_main.h>
12#include <nxt_runtime.h>
13#include <nxt_main_process.h>
14#include <nxt_application.h>
15
16
17typedef struct nxt_http_request_s nxt_http_request_t;
18
19
17typedef struct {
18 nxt_thread_spinlock_t lock;
19 nxt_queue_t engines;
20
21 nxt_queue_t sockets; /* of nxt_socket_conf_t */
22 nxt_queue_t apps; /* of nxt_app_t */
23} nxt_router_t;
24

--- 97 unchanged lines hidden (view full) ---

122
123 nxt_listen_socket_t *listen;
124
125 size_t header_buffer_size;
126 size_t large_header_buffer_size;
127 size_t large_header_buffers;
128 size_t body_buffer_size;
129 size_t max_body_size;
20typedef struct {
21 nxt_thread_spinlock_t lock;
22 nxt_queue_t engines;
23
24 nxt_queue_t sockets; /* of nxt_socket_conf_t */
25 nxt_queue_t apps; /* of nxt_app_t */
26} nxt_router_t;
27

--- 97 unchanged lines hidden (view full) ---

125
126 nxt_listen_socket_t *listen;
127
128 size_t header_buffer_size;
129 size_t large_header_buffer_size;
130 size_t large_header_buffers;
131 size_t body_buffer_size;
132 size_t max_body_size;
133 nxt_msec_t idle_timeout;
130 nxt_msec_t header_read_timeout;
131 nxt_msec_t body_read_timeout;
134 nxt_msec_t header_read_timeout;
135 nxt_msec_t body_read_timeout;
136 nxt_msec_t send_timeout;
132} nxt_socket_conf_t;
133
134
135typedef struct {
136 uint32_t count;
137 nxt_queue_link_t link;
138 nxt_event_engine_t *engine;
139 nxt_socket_conf_t *socket_conf;
140
141 /* Modules configuraitons. */
142} nxt_socket_conf_joint_t;
143
144
145void nxt_router_new_port_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg);
146void nxt_router_conf_data_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg);
147void nxt_router_remove_pid_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg);
148
137} nxt_socket_conf_t;
138
139
140typedef struct {
141 uint32_t count;
142 nxt_queue_link_t link;
143 nxt_event_engine_t *engine;
144 nxt_socket_conf_t *socket_conf;
145
146 /* Modules configuraitons. */
147} nxt_socket_conf_joint_t;
148
149
150void nxt_router_new_port_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg);
151void nxt_router_conf_data_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg);
152void nxt_router_remove_pid_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg);
153
154void nxt_router_process_http_request(nxt_task_t *task, nxt_app_parse_ctx_t *ar);
149void nxt_router_app_port_close(nxt_task_t *task, nxt_port_t *port);
150void nxt_router_app_use(nxt_task_t *task, nxt_app_t *app, int i);
151
155void nxt_router_app_port_close(nxt_task_t *task, nxt_port_t *port);
156void nxt_router_app_use(nxt_task_t *task, nxt_app_t *app, int i);
157
158
152#endif /* _NXT_ROUTER_H_INCLUDED_ */
159#endif /* _NXT_ROUTER_H_INCLUDED_ */