Mercurial > hg > nginx
comparison src/core/ngx_resolver.h @ 6365:d35b4d590b2d
Resolver: renamed UDP-specific structures, fields and variables.
They will be used for TCP connections as well.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Thu, 28 Jan 2016 15:28:20 +0300 |
parents | 69977457e1a6 |
children | 2e5c027f2a98 |
comparison
equal
deleted
inserted
replaced
6364:69977457e1a6 | 6365:d35b4d590b2d |
---|---|
35 | 35 |
36 #define NGX_RESOLVER_MAX_RECURSION 50 | 36 #define NGX_RESOLVER_MAX_RECURSION 50 |
37 | 37 |
38 | 38 |
39 typedef struct { | 39 typedef struct { |
40 ngx_connection_t *connection; | 40 ngx_connection_t *udp; |
41 struct sockaddr *sockaddr; | 41 struct sockaddr *sockaddr; |
42 socklen_t socklen; | 42 socklen_t socklen; |
43 ngx_str_t server; | 43 ngx_str_t server; |
44 ngx_log_t log; | 44 ngx_log_t log; |
45 } ngx_udp_connection_t; | 45 } ngx_resolver_connection_t; |
46 | 46 |
47 | 47 |
48 typedef struct ngx_resolver_ctx_s ngx_resolver_ctx_t; | 48 typedef struct ngx_resolver_ctx_s ngx_resolver_ctx_t; |
49 | 49 |
50 typedef void (*ngx_resolver_handler_pt)(ngx_resolver_ctx_t *ctx); | 50 typedef void (*ngx_resolver_handler_pt)(ngx_resolver_ctx_t *ctx); |
105 | 105 |
106 /* event ident must be after 3 pointers as in ngx_connection_t */ | 106 /* event ident must be after 3 pointers as in ngx_connection_t */ |
107 ngx_int_t ident; | 107 ngx_int_t ident; |
108 | 108 |
109 /* simple round robin DNS peers balancer */ | 109 /* simple round robin DNS peers balancer */ |
110 ngx_array_t udp_connections; | 110 ngx_array_t connections; |
111 ngx_uint_t last_connection; | 111 ngx_uint_t last_connection; |
112 | 112 |
113 ngx_rbtree_t name_rbtree; | 113 ngx_rbtree_t name_rbtree; |
114 ngx_rbtree_node_t name_sentinel; | 114 ngx_rbtree_node_t name_sentinel; |
115 | 115 |