diff options
author | Igor Sysoev <igor@sysoev.ru> | 2017-07-05 14:05:21 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2017-07-05 14:05:21 +0300 |
commit | 4fe5d22dcc5d6e42c5faa6fe06dd076cde799324 (patch) | |
tree | 91f346ac5380888617f4ed32fa0933445c4bd65a /src/nxt_router.h | |
parent | d28d502aa5c6982552ce6626088a77f3295465f6 (diff) | |
download | unit-4fe5d22dcc5d6e42c5faa6fe06dd076cde799324.tar.gz unit-4fe5d22dcc5d6e42c5faa6fe06dd076cde799324.tar.bz2 |
Router: processing JSON configuration.
Diffstat (limited to 'src/nxt_router.h')
-rw-r--r-- | src/nxt_router.h | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/src/nxt_router.h b/src/nxt_router.h index 9e2dd0a6..9c6f75b4 100644 --- a/src/nxt_router.h +++ b/src/nxt_router.h @@ -17,7 +17,7 @@ typedef struct { nxt_thread_spinlock_t lock; nxt_queue_t engines; - nxt_queue_t sockets; + nxt_queue_t sockets; /* of nxt_socket_conf_t */ } nxt_router_t; @@ -39,11 +39,11 @@ typedef struct { typedef struct { - nxt_queue_t creating; - nxt_queue_t pending; - nxt_queue_t updating; - nxt_queue_t keeping; - nxt_queue_t deleting; + nxt_queue_t creating; /* of nxt_socket_conf_t */ + nxt_queue_t pending; /* of nxt_socket_conf_t */ + nxt_queue_t updating; /* of nxt_socket_conf_t */ + nxt_queue_t keeping; /* of nxt_socket_conf_t */ + nxt_queue_t deleting; /* of nxt_socket_conf_t */ uint32_t new_threads; @@ -55,9 +55,18 @@ typedef struct { typedef struct { uint32_t count; - nxt_listen_socket_t listen; + nxt_socket_t fd; +} nxt_router_socket_t; + + +typedef struct { + uint32_t count; nxt_queue_link_t link; + nxt_router_socket_t *socket; nxt_router_conf_t *router_conf; + nxt_sockaddr_t *sockaddr; + + nxt_listen_socket_t listen; size_t header_buffer_size; size_t large_header_buffer_size; @@ -75,4 +84,8 @@ typedef struct { } nxt_socket_conf_joint_t; +nxt_int_t nxt_router_new_conf(nxt_task_t *task, nxt_runtime_t *rt, + nxt_router_t *router, u_char *start, u_char *end); + + #endif /* _NXT_ROUTER_H_INCLUDED_ */ |