aboutsummaryrefslogtreecommitdiff
path: root/src/examples/mhd2spdy_structures.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/examples/mhd2spdy_structures.h')
-rw-r--r--src/examples/mhd2spdy_structures.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/examples/mhd2spdy_structures.h b/src/examples/mhd2spdy_structures.h
index 863661b2..c9aa4c39 100644
--- a/src/examples/mhd2spdy_structures.h
+++ b/src/examples/mhd2spdy_structures.h
@@ -159,10 +159,22 @@ struct global_options
159 bool verbose; 159 bool verbose;
160 bool only_proxy; 160 bool only_proxy;
161 bool spdy_data_received; 161 bool spdy_data_received;
162 bool statistics;
162} 163}
163glob_opt; 164glob_opt;
164 165
165 166
167struct global_statistics
168{
169 //unsigned long long http_bytes_sent;
170 //unsigned long long http_bytes_received;
171 unsigned long long spdy_bytes_sent;
172 unsigned long long spdy_bytes_received;
173 unsigned long long spdy_bytes_received_and_dropped;
174}
175glob_stat;
176
177
166//forbidden headers 178//forbidden headers
167#define SPDY_HTTP_HEADER_TRANSFER_ENCODING "transfer-encoding" 179#define SPDY_HTTP_HEADER_TRANSFER_ENCODING "transfer-encoding"
168#define SPDY_HTTP_HEADER_PROXY_CONNECTION "proxy-connection" 180#define SPDY_HTTP_HEADER_PROXY_CONNECTION "proxy-connection"
@@ -241,6 +253,13 @@ glob_opt;
241 while(0) 253 while(0)
242 254
243 255
256#define UPDATE_STAT(stat, value) do{\
257 if(glob_opt.statistics)\
258 {\
259 stat += value;\
260 }\
261 }\
262 while(0)
244 263
245 264
246void 265void