Lines Matching refs:httpc
89 const struct http_conn *c = &conn->proto.httpc;
119 struct http_conn *c = &conn->proto.httpc;
165 conn->proto.httpc.settings.max_concurrent_streams =
263 struct http_conn *c = &conn->proto.httpc;
383 struct http_conn *httpc;
436 httpc = &conn->proto.httpc;
437 nghttp2_session_set_stream_user_data(httpc->h2,
452 struct http_conn *httpc = &conn->proto.httpc;
463 uint32_t max_conn = httpc->settings.max_concurrent_streams;
465 httpc->settings.max_concurrent_streams =
468 httpc->settings.enable_push =
472 httpc->settings.max_concurrent_streams));
474 httpc->settings.enable_push?"TRUE":"false"));
475 if(max_conn != httpc->settings.max_concurrent_streams) {
551 httpc->drain_total++;
628 conn->proto.httpc.drain_total++;
646 data_s->easy_conn->proto.httpc.pause_stream_id = stream_id;
654 data_s->easy_conn->proto.httpc.pause_stream_id = stream_id;
732 conn->proto.httpc.drain_total++;
993 struct http_conn *httpc = &conn->proto.httpc;
1013 nghttp2_submit_rst_stream(httpc->h2, NGHTTP2_FLAG_NONE, http->stream_id,
1015 if(http->stream_id == httpc->pause_stream_id) {
1017 httpc->pause_stream_id = 0;
1021 nghttp2_session_set_stream_user_data(httpc->h2, http->stream_id, 0);
1031 if(!conn->proto.httpc.h2) {
1035 conn->proto.httpc.inbuf = malloc(H2_BUFSIZE);
1036 if(conn->proto.httpc.inbuf == NULL)
1078 rc = nghttp2_session_client_new(&conn->proto.httpc.h2, callbacks, conn);
1101 uint8_t *binsettings = conn->proto.httpc.binsettings;
1116 conn->proto.httpc.binlen = binlen;
1138 static int should_close_session(struct http_conn *httpc)
1140 return httpc->drain_total == 0 && !nghttp2_session_want_read(httpc->h2) &&
1141 !nghttp2_session_want_write(httpc->h2);
1149 * httpc->inbuf. Then, call h2_session_send() to send pending data.
1154 struct http_conn *httpc,
1161 nread = httpc->inbuflen - httpc->nread_inbuf;
1162 inbuf = httpc->inbuf + httpc->nread_inbuf;
1164 rv = nghttp2_session_mem_recv(httpc->h2, (const uint8_t *)inbuf, nread);
1177 httpc->inbuflen = 0;
1178 httpc->nread_inbuf = 0;
1181 httpc->nread_inbuf += rv;
1185 httpc->inbuflen - httpc->nread_inbuf));
1188 rv = h2_session_send(data, httpc->h2);
1194 if(should_close_session(httpc)) {
1219 struct http_conn *httpc = &conn->proto.httpc;
1220 nghttp2_session *h2 = httpc->h2;
1228 (void)h2_process_pending_input(conn->data, httpc, &result);
1241 struct http_conn *httpc = &conn->proto.httpc;
1243 if(httpc->pause_stream_id == stream->stream_id) {
1244 httpc->pause_stream_id = 0;
1247 DEBUGASSERT(httpc->drain_total >= data->state.drain);
1248 httpc->drain_total -= data->state.drain;
1251 if(httpc->pause_stream_id == 0) {
1252 if(h2_process_pending_input(data, httpc, err) != 0) {
1356 struct http_conn *httpc = &conn->proto.httpc;
1362 if(should_close_session(httpc)) {
1408 if(httpc->pause_stream_id == stream->stream_id && !stream->pausedata) {
1411 httpc->pause_stream_id = 0;
1412 if(h2_process_pending_input(data, httpc, &result) != 0) {
1419 DEBUGASSERT(httpc->pause_stream_id == stream->stream_id);
1429 assert(httpc->pause_stream_id == stream->stream_id);
1430 httpc->pause_stream_id = 0;
1442 if(h2_process_pending_input(data, httpc, &result) != 0) {
1451 else if(httpc->pause_stream_id) {
1461 stream->stream_id, httpc->pause_stream_id));
1473 if(httpc->inbuflen == 0) {
1474 nread = ((Curl_recv *)httpc->recv_underlying)(
1475 conn, FIRSTSOCKET, httpc->inbuf, H2_BUFSIZE, &result);
1496 httpc->inbuflen = nread;
1497 inbuf = httpc->inbuf;
1500 nread = httpc->inbuflen - httpc->nread_inbuf;
1501 inbuf = httpc->inbuf + httpc->nread_inbuf;
1506 rv = nghttp2_session_mem_recv(httpc->h2, (const uint8_t *)inbuf, nread);
1517 httpc->inbuflen = 0;
1518 httpc->nread_inbuf = 0;
1521 httpc->nread_inbuf += rv;
1523 httpc->inbuflen - httpc->nread_inbuf));
1527 rv = h2_session_send(data, httpc->h2);
1533 if(should_close_session(httpc)) {
1545 if(httpc->pause_stream_id == stream->stream_id) {
1552 DEBUGASSERT(httpc->drain_total >= data->state.drain);
1553 httpc->drain_total -= data->state.drain;
1652 struct http_conn *httpc = &conn->proto.httpc;
1662 nghttp2_session *h2 = httpc->h2;
1695 if(should_close_session(httpc)) {
1929 if(should_close_session(httpc)) {
1958 struct http_conn *httpc = &conn->proto.httpc;
1984 httpc->inbuflen = 0;
1985 httpc->nread_inbuf = 0;
1987 httpc->pause_stream_id = 0;
1988 httpc->drain_total = 0;
2004 struct http_conn *httpc = &conn->proto.httpc;
2014 httpc->recv_underlying = (recving)conn->recv[FIRSTSOCKET];
2015 httpc->send_underlying = (sending)conn->send[FIRSTSOCKET];
2023 rv = nghttp2_session_upgrade(httpc->h2, httpc->binsettings,
2024 httpc->binlen, NULL);
2031 nghttp2_session_set_stream_user_data(httpc->h2,
2038 rv = nghttp2_submit_settings(httpc->h2, NGHTTP2_FLAG_NONE, settings,
2047 rv = nghttp2_session_set_local_window_size(httpc->h2, NGHTTP2_FLAG_NONE, 0,
2055 /* we are going to copy mem to httpc->inbuf. This is required since
2071 memcpy(httpc->inbuf, mem, nread);
2072 httpc->inbuflen = nread;
2074 nproc = nghttp2_session_mem_recv(httpc->h2, (const uint8_t *)httpc->inbuf,
2075 httpc->inbuflen);
2086 httpc->inbuflen = 0;
2087 httpc->nread_inbuf = 0;
2090 httpc->nread_inbuf += nproc;
2094 rv = h2_session_send(data, httpc->h2);
2102 if(should_close_session(httpc)) {