Mercurial > hg > nginx-quic
annotate src/http/ngx_http_spdy.h @ 6076:1d6eb39d05c9 stable-1.6
SSL: logging level of "inappropriate fallback" (ticket #662).
Patch by Erik Dubbelboer.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 17 Nov 2014 16:38:48 +0300 |
parents | 2bc609a4b516 |
children | 34d460c5d186 |
rev | line source |
---|---|
5121
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
1 /* |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
2 * Copyright (C) Nginx, Inc. |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
3 * Copyright (C) Valentin V. Bartenev |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
4 */ |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
5 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
6 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
7 #ifndef _NGX_HTTP_SPDY_H_INCLUDED_ |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
8 #define _NGX_HTTP_SPDY_H_INCLUDED_ |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
9 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
10 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
11 #include <ngx_config.h> |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
12 #include <ngx_core.h> |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
13 #include <ngx_http.h> |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
14 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
15 #include <zlib.h> |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
16 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
17 |
5549
39d7eef2e332
SPDY: protocol implementation switched to spdy/3.1.
Valentin Bartenev <vbart@nginx.com>
parents:
5545
diff
changeset
|
18 #define NGX_SPDY_VERSION 3 |
5121
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
19 |
5549
39d7eef2e332
SPDY: protocol implementation switched to spdy/3.1.
Valentin Bartenev <vbart@nginx.com>
parents:
5545
diff
changeset
|
20 #define NGX_SPDY_NPN_ADVERTISE "\x08spdy/3.1" |
39d7eef2e332
SPDY: protocol implementation switched to spdy/3.1.
Valentin Bartenev <vbart@nginx.com>
parents:
5545
diff
changeset
|
21 #define NGX_SPDY_NPN_NEGOTIATED "spdy/3.1" |
5121
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
22 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
23 #define NGX_SPDY_STATE_BUFFER_SIZE 16 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
24 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
25 #define NGX_SPDY_CTL_BIT 1 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
26 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
27 #define NGX_SPDY_SYN_STREAM 1 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
28 #define NGX_SPDY_SYN_REPLY 2 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
29 #define NGX_SPDY_RST_STREAM 3 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
30 #define NGX_SPDY_SETTINGS 4 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
31 #define NGX_SPDY_PING 6 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
32 #define NGX_SPDY_GOAWAY 7 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
33 #define NGX_SPDY_HEADERS 8 |
5549
39d7eef2e332
SPDY: protocol implementation switched to spdy/3.1.
Valentin Bartenev <vbart@nginx.com>
parents:
5545
diff
changeset
|
34 #define NGX_SPDY_WINDOW_UPDATE 9 |
5121
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
35 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
36 #define NGX_SPDY_FRAME_HEADER_SIZE 8 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
37 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
38 #define NGX_SPDY_SID_SIZE 4 |
5549
39d7eef2e332
SPDY: protocol implementation switched to spdy/3.1.
Valentin Bartenev <vbart@nginx.com>
parents:
5545
diff
changeset
|
39 #define NGX_SPDY_DELTA_SIZE 4 |
5121
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
40 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
41 #define NGX_SPDY_SYN_STREAM_SIZE 10 |
5549
39d7eef2e332
SPDY: protocol implementation switched to spdy/3.1.
Valentin Bartenev <vbart@nginx.com>
parents:
5545
diff
changeset
|
42 #define NGX_SPDY_SYN_REPLY_SIZE 4 |
5121
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
43 #define NGX_SPDY_RST_STREAM_SIZE 8 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
44 #define NGX_SPDY_PING_SIZE 4 |
5549
39d7eef2e332
SPDY: protocol implementation switched to spdy/3.1.
Valentin Bartenev <vbart@nginx.com>
parents:
5545
diff
changeset
|
45 #define NGX_SPDY_GOAWAY_SIZE 8 |
39d7eef2e332
SPDY: protocol implementation switched to spdy/3.1.
Valentin Bartenev <vbart@nginx.com>
parents:
5545
diff
changeset
|
46 #define NGX_SPDY_WINDOW_UPDATE_SIZE 8 |
39d7eef2e332
SPDY: protocol implementation switched to spdy/3.1.
Valentin Bartenev <vbart@nginx.com>
parents:
5545
diff
changeset
|
47 #define NGX_SPDY_NV_NUM_SIZE 4 |
39d7eef2e332
SPDY: protocol implementation switched to spdy/3.1.
Valentin Bartenev <vbart@nginx.com>
parents:
5545
diff
changeset
|
48 #define NGX_SPDY_NV_NLEN_SIZE 4 |
39d7eef2e332
SPDY: protocol implementation switched to spdy/3.1.
Valentin Bartenev <vbart@nginx.com>
parents:
5545
diff
changeset
|
49 #define NGX_SPDY_NV_VLEN_SIZE 4 |
5121
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
50 #define NGX_SPDY_SETTINGS_NUM_SIZE 4 |
5549
39d7eef2e332
SPDY: protocol implementation switched to spdy/3.1.
Valentin Bartenev <vbart@nginx.com>
parents:
5545
diff
changeset
|
51 #define NGX_SPDY_SETTINGS_FID_SIZE 4 |
5121
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
52 #define NGX_SPDY_SETTINGS_VAL_SIZE 4 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
53 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
54 #define NGX_SPDY_SETTINGS_PAIR_SIZE \ |
5549
39d7eef2e332
SPDY: protocol implementation switched to spdy/3.1.
Valentin Bartenev <vbart@nginx.com>
parents:
5545
diff
changeset
|
55 (NGX_SPDY_SETTINGS_FID_SIZE + NGX_SPDY_SETTINGS_VAL_SIZE) |
5121
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
56 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
57 #define NGX_SPDY_HIGHEST_PRIORITY 0 |
5549
39d7eef2e332
SPDY: protocol implementation switched to spdy/3.1.
Valentin Bartenev <vbart@nginx.com>
parents:
5545
diff
changeset
|
58 #define NGX_SPDY_LOWEST_PRIORITY 7 |
5121
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
59 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
60 #define NGX_SPDY_FLAG_FIN 0x01 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
61 #define NGX_SPDY_FLAG_UNIDIRECTIONAL 0x02 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
62 #define NGX_SPDY_FLAG_CLEAR_SETTINGS 0x01 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
63 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
64 #define NGX_SPDY_MAX_FRAME_SIZE ((1 << 24) - 1) |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
65 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
66 #define NGX_SPDY_DATA_DISCARD 1 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
67 #define NGX_SPDY_DATA_ERROR 2 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
68 #define NGX_SPDY_DATA_INTERNAL_ERROR 3 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
69 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
70 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
71 typedef struct ngx_http_spdy_connection_s ngx_http_spdy_connection_t; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
72 typedef struct ngx_http_spdy_out_frame_s ngx_http_spdy_out_frame_t; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
73 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
74 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
75 typedef u_char *(*ngx_http_spdy_handler_pt) (ngx_http_spdy_connection_t *sc, |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
76 u_char *pos, u_char *end); |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
77 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
78 struct ngx_http_spdy_connection_s { |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
79 ngx_connection_t *connection; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
80 ngx_http_connection_t *http_connection; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
81 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
82 ngx_uint_t processing; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
83 |
5549
39d7eef2e332
SPDY: protocol implementation switched to spdy/3.1.
Valentin Bartenev <vbart@nginx.com>
parents:
5545
diff
changeset
|
84 size_t send_window; |
39d7eef2e332
SPDY: protocol implementation switched to spdy/3.1.
Valentin Bartenev <vbart@nginx.com>
parents:
5545
diff
changeset
|
85 size_t recv_window; |
39d7eef2e332
SPDY: protocol implementation switched to spdy/3.1.
Valentin Bartenev <vbart@nginx.com>
parents:
5545
diff
changeset
|
86 size_t init_window; |
39d7eef2e332
SPDY: protocol implementation switched to spdy/3.1.
Valentin Bartenev <vbart@nginx.com>
parents:
5545
diff
changeset
|
87 |
39d7eef2e332
SPDY: protocol implementation switched to spdy/3.1.
Valentin Bartenev <vbart@nginx.com>
parents:
5545
diff
changeset
|
88 ngx_queue_t waiting; |
39d7eef2e332
SPDY: protocol implementation switched to spdy/3.1.
Valentin Bartenev <vbart@nginx.com>
parents:
5545
diff
changeset
|
89 |
5121
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
90 u_char buffer[NGX_SPDY_STATE_BUFFER_SIZE]; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
91 size_t buffer_used; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
92 ngx_http_spdy_handler_pt handler; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
93 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
94 z_stream zstream_in; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
95 z_stream zstream_out; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
96 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
97 ngx_pool_t *pool; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
98 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
99 ngx_http_spdy_out_frame_t *free_ctl_frames; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
100 ngx_connection_t *free_fake_connections; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
101 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
102 ngx_http_spdy_stream_t **streams_index; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
103 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
104 ngx_http_spdy_out_frame_t *last_out; |
5530
827e53c136b0
SPDY: use ngx_queue_t to queue streams for post processing.
Valentin Bartenev <vbart@nginx.com>
parents:
5529
diff
changeset
|
105 |
827e53c136b0
SPDY: use ngx_queue_t to queue streams for post processing.
Valentin Bartenev <vbart@nginx.com>
parents:
5529
diff
changeset
|
106 ngx_queue_t posted; |
5121
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
107 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
108 ngx_http_spdy_stream_t *stream; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
109 |
5525
206c56e23a96
SPDY: better name for frame entries counter.
Valentin Bartenev <vbart@nginx.com>
parents:
5514
diff
changeset
|
110 ngx_uint_t entries; |
5121
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
111 size_t length; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
112 u_char flags; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
113 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
114 ngx_uint_t last_sid; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
115 |
5493
916cb6d28f6a
SPDY: fixed possible request hang.
Valentin Bartenev <vbart@nginx.com>
parents:
5405
diff
changeset
|
116 unsigned blocked:1; |
5509
877a7bd72070
SPDY: better name for flag that indicates incomplete frame state.
Valentin Bartenev <vbart@nginx.com>
parents:
5508
diff
changeset
|
117 unsigned incomplete:1; |
5121
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
118 }; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
119 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
120 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
121 struct ngx_http_spdy_stream_s { |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
122 ngx_uint_t id; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
123 ngx_http_request_t *request; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
124 ngx_http_spdy_connection_t *connection; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
125 ngx_http_spdy_stream_t *index; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
126 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
127 ngx_uint_t header_buffers; |
5508
9053fdcea4b7
SPDY: better name for queued frames counter.
Valentin Bartenev <vbart@nginx.com>
parents:
5493
diff
changeset
|
128 ngx_uint_t queued; |
9053fdcea4b7
SPDY: better name for queued frames counter.
Valentin Bartenev <vbart@nginx.com>
parents:
5493
diff
changeset
|
129 |
5549
39d7eef2e332
SPDY: protocol implementation switched to spdy/3.1.
Valentin Bartenev <vbart@nginx.com>
parents:
5545
diff
changeset
|
130 /* |
39d7eef2e332
SPDY: protocol implementation switched to spdy/3.1.
Valentin Bartenev <vbart@nginx.com>
parents:
5545
diff
changeset
|
131 * A change to SETTINGS_INITIAL_WINDOW_SIZE could cause the |
39d7eef2e332
SPDY: protocol implementation switched to spdy/3.1.
Valentin Bartenev <vbart@nginx.com>
parents:
5545
diff
changeset
|
132 * send_window to become negative, hence it's signed. |
39d7eef2e332
SPDY: protocol implementation switched to spdy/3.1.
Valentin Bartenev <vbart@nginx.com>
parents:
5545
diff
changeset
|
133 */ |
39d7eef2e332
SPDY: protocol implementation switched to spdy/3.1.
Valentin Bartenev <vbart@nginx.com>
parents:
5545
diff
changeset
|
134 ssize_t send_window; |
39d7eef2e332
SPDY: protocol implementation switched to spdy/3.1.
Valentin Bartenev <vbart@nginx.com>
parents:
5545
diff
changeset
|
135 size_t recv_window; |
39d7eef2e332
SPDY: protocol implementation switched to spdy/3.1.
Valentin Bartenev <vbart@nginx.com>
parents:
5545
diff
changeset
|
136 |
5121
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
137 ngx_http_spdy_out_frame_t *free_frames; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
138 ngx_chain_t *free_data_headers; |
5514
b7ee1bae0ffa
SPDY: implemented buffers chain splitting.
Valentin Bartenev <vbart@nginx.com>
parents:
5509
diff
changeset
|
139 ngx_chain_t *free_bufs; |
5121
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
140 |
5530
827e53c136b0
SPDY: use ngx_queue_t to queue streams for post processing.
Valentin Bartenev <vbart@nginx.com>
parents:
5529
diff
changeset
|
141 ngx_queue_t queue; |
827e53c136b0
SPDY: use ngx_queue_t to queue streams for post processing.
Valentin Bartenev <vbart@nginx.com>
parents:
5529
diff
changeset
|
142 |
5549
39d7eef2e332
SPDY: protocol implementation switched to spdy/3.1.
Valentin Bartenev <vbart@nginx.com>
parents:
5545
diff
changeset
|
143 unsigned priority:3; |
5121
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
144 unsigned handled:1; |
5493
916cb6d28f6a
SPDY: fixed possible request hang.
Valentin Bartenev <vbart@nginx.com>
parents:
5405
diff
changeset
|
145 unsigned blocked:1; |
5549
39d7eef2e332
SPDY: protocol implementation switched to spdy/3.1.
Valentin Bartenev <vbart@nginx.com>
parents:
5545
diff
changeset
|
146 unsigned exhausted:1; |
5121
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
147 unsigned in_closed:1; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
148 unsigned out_closed:1; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
149 unsigned skip_data:2; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
150 }; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
151 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
152 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
153 struct ngx_http_spdy_out_frame_s { |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
154 ngx_http_spdy_out_frame_t *next; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
155 ngx_chain_t *first; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
156 ngx_chain_t *last; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
157 ngx_int_t (*handler)(ngx_http_spdy_connection_t *sc, |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
158 ngx_http_spdy_out_frame_t *frame); |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
159 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
160 ngx_http_spdy_stream_t *stream; |
5529
e4adaa47af65
SPDY: store the length of frame instead of its whole size.
Valentin Bartenev <vbart@nginx.com>
parents:
5528
diff
changeset
|
161 size_t length; |
5121
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
162 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
163 ngx_uint_t priority; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
164 unsigned blocked:1; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
165 unsigned fin:1; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
166 }; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
167 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
168 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
169 static ngx_inline void |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
170 ngx_http_spdy_queue_frame(ngx_http_spdy_connection_t *sc, |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
171 ngx_http_spdy_out_frame_t *frame) |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
172 { |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
173 ngx_http_spdy_out_frame_t **out; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
174 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
175 for (out = &sc->last_out; *out; out = &(*out)->next) |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
176 { |
5576
2bc609a4b516
SPDY: fixed reversed priority order in window waiting queue.
Valentin Bartenev <vbart@nginx.com>
parents:
5549
diff
changeset
|
177 /* |
2bc609a4b516
SPDY: fixed reversed priority order in window waiting queue.
Valentin Bartenev <vbart@nginx.com>
parents:
5549
diff
changeset
|
178 * NB: higher values represent lower priorities. |
2bc609a4b516
SPDY: fixed reversed priority order in window waiting queue.
Valentin Bartenev <vbart@nginx.com>
parents:
5549
diff
changeset
|
179 */ |
5121
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
180 if (frame->priority >= (*out)->priority) { |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
181 break; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
182 } |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
183 } |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
184 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
185 frame->next = *out; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
186 *out = frame; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
187 } |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
188 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
189 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
190 static ngx_inline void |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
191 ngx_http_spdy_queue_blocked_frame(ngx_http_spdy_connection_t *sc, |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
192 ngx_http_spdy_out_frame_t *frame) |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
193 { |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
194 ngx_http_spdy_out_frame_t **out; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
195 |
5405
620808518349
SPDY: ignore priority when queuing blocked frames.
Valentin Bartenev <vbart@nginx.com>
parents:
5225
diff
changeset
|
196 for (out = &sc->last_out; *out; out = &(*out)->next) |
5121
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
197 { |
5405
620808518349
SPDY: ignore priority when queuing blocked frames.
Valentin Bartenev <vbart@nginx.com>
parents:
5225
diff
changeset
|
198 if ((*out)->blocked) { |
5121
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
199 break; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
200 } |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
201 } |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
202 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
203 frame->next = *out; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
204 *out = frame; |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
205 } |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
206 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
207 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
208 void ngx_http_spdy_init(ngx_event_t *rev); |
5225
15a7deeaa19a
Use "void" for functions with empty parameter list.
Sergey Kandaurov <pluknet@nginx.com>
parents:
5121
diff
changeset
|
209 void ngx_http_spdy_request_headers_init(void); |
5121
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
210 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
211 ngx_int_t ngx_http_spdy_read_request_body(ngx_http_request_t *r, |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
212 ngx_http_client_body_handler_pt post_handler); |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
213 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
214 void ngx_http_spdy_close_stream(ngx_http_spdy_stream_t *stream, ngx_int_t rc); |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
215 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
216 ngx_int_t ngx_http_spdy_send_output_queue(ngx_http_spdy_connection_t *sc); |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
217 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
218 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
219 #define ngx_spdy_frame_aligned_write_uint16(p, s) \ |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
220 (*(uint16_t *) (p) = htons((uint16_t) (s)), (p) + sizeof(uint16_t)) |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
221 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
222 #define ngx_spdy_frame_aligned_write_uint32(p, s) \ |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
223 (*(uint32_t *) (p) = htonl((uint32_t) (s)), (p) + sizeof(uint32_t)) |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
224 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
225 #if (NGX_HAVE_NONALIGNED) |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
226 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
227 #define ngx_spdy_frame_write_uint16 ngx_spdy_frame_aligned_write_uint16 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
228 #define ngx_spdy_frame_write_uint32 ngx_spdy_frame_aligned_write_uint32 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
229 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
230 #else |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
231 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
232 #define ngx_spdy_frame_write_uint16(p, s) \ |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
233 ((p)[0] = (u_char) (s) >> 8, (p)[1] = (u_char) (s), (p) + sizeof(uint16_t)) |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
234 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
235 #define ngx_spdy_frame_write_uint32(p, s) \ |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
236 ((p)[0] = (u_char) (s) >> 24, \ |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
237 (p)[1] = (u_char) (s) >> 16, \ |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
238 (p)[2] = (u_char) (s) >> 8, \ |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
239 (p)[3] = (u_char) (s), (p) + sizeof(uint32_t)) |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
240 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
241 #endif |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
242 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
243 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
244 #define ngx_spdy_ctl_frame_head(t) \ |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
245 ((uint32_t) NGX_SPDY_CTL_BIT << 31 | NGX_SPDY_VERSION << 16 | (t)) |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
246 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
247 #define ngx_spdy_frame_write_head(p, t) \ |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
248 ngx_spdy_frame_aligned_write_uint32(p, ngx_spdy_ctl_frame_head(t)) |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
249 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
250 #define ngx_spdy_frame_write_flags_and_len(p, f, l) \ |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
251 ngx_spdy_frame_aligned_write_uint32(p, (f) << 24 | (l)) |
5549
39d7eef2e332
SPDY: protocol implementation switched to spdy/3.1.
Valentin Bartenev <vbart@nginx.com>
parents:
5545
diff
changeset
|
252 #define ngx_spdy_frame_write_flags_and_id(p, f, i) \ |
39d7eef2e332
SPDY: protocol implementation switched to spdy/3.1.
Valentin Bartenev <vbart@nginx.com>
parents:
5545
diff
changeset
|
253 ngx_spdy_frame_aligned_write_uint32(p, (f) << 24 | (i)) |
5121
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
254 |
5549
39d7eef2e332
SPDY: protocol implementation switched to spdy/3.1.
Valentin Bartenev <vbart@nginx.com>
parents:
5545
diff
changeset
|
255 #define ngx_spdy_frame_write_sid ngx_spdy_frame_aligned_write_uint32 |
39d7eef2e332
SPDY: protocol implementation switched to spdy/3.1.
Valentin Bartenev <vbart@nginx.com>
parents:
5545
diff
changeset
|
256 #define ngx_spdy_frame_write_window ngx_spdy_frame_aligned_write_uint32 |
5121
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
257 |
c0f7b94e88ba
Preliminary experimental support for SPDY draft 2.
Valentin Bartenev <vbart@nginx.com>
parents:
diff
changeset
|
258 #endif /* _NGX_HTTP_SPDY_H_INCLUDED_ */ |