comparison src/stream/ngx_stream.h @ 6674:38143d1abdec

Stream: the $status variable. The stream session status is one of the following: 200 - normal completion 403 - access forbidden 500 - internal server error 502 - bad gateway 503 - limit conn
author Roman Arutyunyan <arut@nginx.com>
date Thu, 11 Aug 2016 20:22:23 +0300
parents 164a0824ce20
children ab9b4fd8c5b7
comparison
equal deleted inserted replaced
6673:e4c1f5b32868 6674:38143d1abdec
22 22
23 #include <ngx_stream_variables.h> 23 #include <ngx_stream_variables.h>
24 #include <ngx_stream_script.h> 24 #include <ngx_stream_script.h>
25 #include <ngx_stream_upstream.h> 25 #include <ngx_stream_upstream.h>
26 #include <ngx_stream_upstream_round_robin.h> 26 #include <ngx_stream_upstream_round_robin.h>
27
28
29 #define NGX_STREAM_OK 200
30 #define NGX_STREAM_FORBIDDEN 403
31 #define NGX_STREAM_INTERNAL_SERVER_ERROR 500
32 #define NGX_STREAM_BAD_GATEWAY 502
33 #define NGX_STREAM_SERVICE_UNAVAILABLE 503
27 34
28 35
29 typedef struct { 36 typedef struct {
30 void **main_conf; 37 void **main_conf;
31 void **srv_conf; 38 void **srv_conf;
171 #if (NGX_PCRE) 178 #if (NGX_PCRE)
172 ngx_uint_t ncaptures; 179 ngx_uint_t ncaptures;
173 int *captures; 180 int *captures;
174 u_char *captures_data; 181 u_char *captures_data;
175 #endif 182 #endif
183
184 ngx_uint_t status;
176 }; 185 };
177 186
178 187
179 typedef struct { 188 typedef struct {
180 ngx_int_t (*preconfiguration)(ngx_conf_t *cf); 189 ngx_int_t (*preconfiguration)(ngx_conf_t *cf);
221 ->main_conf[module.ctx_index]: \ 230 ->main_conf[module.ctx_index]: \
222 NULL) 231 NULL)
223 232
224 233
225 void ngx_stream_init_connection(ngx_connection_t *c); 234 void ngx_stream_init_connection(ngx_connection_t *c);
226 void ngx_stream_close_connection(ngx_connection_t *c); 235 void ngx_stream_finalize_session(ngx_stream_session_t *s, ngx_uint_t rc);
227 236
228 237
229 extern ngx_module_t ngx_stream_module; 238 extern ngx_module_t ngx_stream_module;
230 extern ngx_uint_t ngx_stream_max_module; 239 extern ngx_uint_t ngx_stream_max_module;
231 extern ngx_module_t ngx_stream_core_module; 240 extern ngx_module_t ngx_stream_core_module;