From d99c069e8e134b1bc588c08689719dabae9f794c Mon Sep 17 00:00:00 2001 From: Alexey Plotnik Date: Mon, 22 Sep 2014 00:51:09 +1100 Subject: [PATCH] Add in/out traffice per client (because has no information about traffic itself) --- ngx_rtmp_stat_module.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ngx_rtmp_stat_module.c b/ngx_rtmp_stat_module.c index 326a811..367499b 100644 --- a/ngx_rtmp_stat_module.c +++ b/ngx_rtmp_stat_module.c @@ -364,6 +364,14 @@ ngx_rtmp_stat_client(ngx_http_request_t *r, ngx_chain_t ***lll, NGX_RTMP_STAT_ES(&s->swf_url); NGX_RTMP_STAT_L(""); } + + NGX_RTMP_STAT_L(""); + NGX_RTMP_STAT(buf, ngx_snprintf(buf, sizeof(buf), "%ui", (ngx_uint_t) s->in_bytes) - buf); + NGX_RTMP_STAT_L(""); + + NGX_RTMP_STAT_L(""); + NGX_RTMP_STAT(buf, ngx_snprintf(buf, sizeof(buf), "%ui", (ngx_uint_t) s->out_bytes) - buf); + NGX_RTMP_STAT_L(""); }