| 139 | |
| 140 | |
| 141 | apr_status_t h2_c1_io_init(h2_c1_io *io, h2_session *session) |
| 142 | { |
| 143 | conn_rec *c = session->c1; |
| 144 | |
| 145 | io->session = session; |
| 146 | io->output = apr_brigade_create(c->pool, c->bucket_alloc); |
| 147 | io->flush_threshold = 4 * (apr_size_t)h2_config_sgeti64(session->s, H2_CONF_STREAM_MAX_MEM); |
| 148 | |
| 149 | /* This is what we start with, |
| 150 | * see https://issues.apache.org/jira/browse/TS-2503 |
| 151 | */ |
| 152 | io->warmup_size = h2_config_sgeti64(session->s, H2_CONF_TLS_WARMUP_SIZE); |
| 153 | io->cooldown_usecs = (h2_config_sgeti(session->s, H2_CONF_TLS_COOLDOWN_SECS) |
| 154 | * APR_USEC_PER_SEC); |
| 155 | io->write_size = (io->cooldown_usecs > 0? |
| 156 | WRITE_SIZE_INITIAL : WRITE_SIZE_MAX); |
| 157 | |
| 158 | if (APLOGctrace1(c)) { |
| 159 | ap_log_cerror(APLOG_MARK, APLOG_TRACE4, 0, c, |
| 160 | "h2_c1_io(%ld): init, warmup_size=%ld, " |
| 161 | "cd_secs=%f", c->id, (long)io->warmup_size, |
| 162 | ((double)io->cooldown_usecs/APR_USEC_PER_SEC)); |
| 163 | } |
| 164 | |
| 165 | return APR_SUCCESS; |
| 166 | } |
| 167 | |
| 168 | static void append_scratch(h2_c1_io *io) |
| 169 | { |
no test coverage detected