summaryrefslogtreecommitdiffhomepage
path: root/src/stream/ngx_stream.h
diff options
context:
space:
mode:
authorRoman Arutyunyan <arut@nginx.com>2016-08-11 20:22:23 +0300
committerRoman Arutyunyan <arut@nginx.com>2016-08-11 20:22:23 +0300
commitbe6024f9b72b6d012d52f1ae1c7605a6c4c165da (patch)
tree8837006f7937f59a17adc65f2f5381ad6a4ba5d2 /src/stream/ngx_stream.h
parentea9a1d745b5db26cac2d4b6e231ca6c4af0b4e5a (diff)
downloadnginx-be6024f9b72b6d012d52f1ae1c7605a6c4c165da.tar.gz
nginx-be6024f9b72b6d012d52f1ae1c7605a6c4c165da.tar.bz2
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
Diffstat (limited to '')
-rw-r--r--src/stream/ngx_stream.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/stream/ngx_stream.h b/src/stream/ngx_stream.h
index b68f3d326..91e4671a8 100644
--- a/src/stream/ngx_stream.h
+++ b/src/stream/ngx_stream.h
@@ -26,6 +26,13 @@ typedef struct ngx_stream_session_s ngx_stream_session_t;
#include <ngx_stream_upstream_round_robin.h>
+#define NGX_STREAM_OK 200
+#define NGX_STREAM_FORBIDDEN 403
+#define NGX_STREAM_INTERNAL_SERVER_ERROR 500
+#define NGX_STREAM_BAD_GATEWAY 502
+#define NGX_STREAM_SERVICE_UNAVAILABLE 503
+
+
typedef struct {
void **main_conf;
void **srv_conf;
@@ -173,6 +180,8 @@ struct ngx_stream_session_s {
int *captures;
u_char *captures_data;
#endif
+
+ ngx_uint_t status;
};
@@ -223,7 +232,7 @@ typedef struct {
void ngx_stream_init_connection(ngx_connection_t *c);
-void ngx_stream_close_connection(ngx_connection_t *c);
+void ngx_stream_finalize_session(ngx_stream_session_t *s, ngx_uint_t rc);
extern ngx_module_t ngx_stream_module;