Lines Matching refs:httpc
54 const struct http_conn *c = &conn->proto.httpc; in http2_perform_getsock()
82 struct http_conn *c = &conn->proto.httpc; in http2_disconnect()
101 conn->proto.httpc.settings.max_concurrent_streams = in Curl_http2_setup_conn()
183 struct http_conn *c = &conn->proto.httpc; in send_callback()
212 struct http_conn *httpc = &conn->proto.httpc; in on_frame_recv() local
227 data_s = Curl_hash_pick(&httpc->streamsh, &stream_id, in on_frame_recv()
305 uint32_t max_conn = httpc->settings.max_concurrent_streams; in on_frame_recv()
307 httpc->settings.max_concurrent_streams = in on_frame_recv()
310 httpc->settings.enable_push = in on_frame_recv()
314 httpc->settings.max_concurrent_streams)); in on_frame_recv()
316 httpc->settings.enable_push?"TRUE":"false")); in on_frame_recv()
317 if(max_conn != httpc->settings.max_concurrent_streams) { in on_frame_recv()
363 data_s = Curl_hash_pick(&conn->proto.httpc.streamsh, &stream_id, in on_data_chunk_recv()
396 conn->proto.httpc.pause_stream_id = stream_id; in on_data_chunk_recv()
449 data_s = Curl_hash_pick(&conn->proto.httpc.streamsh, &stream_id, in on_stream_close()
466 Curl_hash_delete(&conn->proto.httpc.streamsh, in on_stream_close()
534 data_s = Curl_hash_pick(&conn->proto.httpc.streamsh, &stream_id, in on_header()
593 struct http_conn *c = &conn->proto.httpc; in data_source_read_callback()
658 if(!conn->proto.httpc.h2) { in Curl_http2_init()
662 conn->proto.httpc.inbuf = malloc(H2_BUFSIZE); in Curl_http2_init()
663 if(conn->proto.httpc.inbuf == NULL) in Curl_http2_init()
703 rc = nghttp2_session_client_new(&conn->proto.httpc.h2, callbacks, conn); in Curl_http2_init()
712 rc = Curl_hash_init(&conn->proto.httpc.streamsh, 7, Curl_hash_str, in Curl_http2_init()
742 uint8_t *binsettings = conn->proto.httpc.binsettings; in Curl_http2_request_upgrade()
757 conn->proto.httpc.binlen = binlen; in Curl_http2_request_upgrade()
776 static ssize_t http2_handle_stream_close(struct http_conn *httpc, in http2_handle_stream_close() argument
779 if(httpc->pause_stream_id == stream->stream_id) { in http2_handle_stream_close()
780 httpc->pause_stream_id = 0; in http2_handle_stream_close()
805 struct http_conn *httpc = &conn->proto.httpc; in http2_recv() local
816 return http2_handle_stream_close(httpc, data, stream, err); in http2_recv()
869 assert(httpc->pause_stream_id == stream->stream_id); in http2_recv()
870 httpc->pause_stream_id = 0; in http2_recv()
879 else if(httpc->pause_stream_id) { in http2_recv()
899 if(httpc->inbuflen == 0) { in http2_recv()
900 nread = ((Curl_recv *)httpc->recv_underlying)( in http2_recv()
901 conn, FIRSTSOCKET, httpc->inbuf, H2_BUFSIZE, &result); in http2_recv()
922 httpc->inbuflen = nread; in http2_recv()
923 inbuf = httpc->inbuf; in http2_recv()
926 nread = httpc->inbuflen - httpc->nread_inbuf; in http2_recv()
927 inbuf = httpc->inbuf + httpc->nread_inbuf; in http2_recv()
932 rv = nghttp2_session_mem_recv(httpc->h2, (const uint8_t *)inbuf, nread); in http2_recv()
943 httpc->inbuflen = 0; in http2_recv()
944 httpc->nread_inbuf = 0; in http2_recv()
947 httpc->nread_inbuf += rv; in http2_recv()
949 httpc->inbuflen - httpc->nread_inbuf)); in http2_recv()
953 rv = nghttp2_session_send(httpc->h2); in http2_recv()
965 if(httpc->pause_stream_id == stream->stream_id) { in http2_recv()
979 return http2_handle_stream_close(httpc, data, stream, err); in http2_recv()
1001 struct http_conn *httpc = &conn->proto.httpc; in http2_send() local
1011 nghttp2_session *h2 = httpc->h2; in http2_send()
1172 if(!Curl_hash_add(&httpc->streamsh, &stream->stream_id, sizeof(stream_id), in http2_send()
1204 struct http_conn *httpc = &conn->proto.httpc; in Curl_http2_setup() local
1230 httpc->inbuflen = 0; in Curl_http2_setup()
1231 httpc->nread_inbuf = 0; in Curl_http2_setup()
1233 httpc->pause_stream_id = 0; in Curl_http2_setup()
1249 struct http_conn *httpc = &conn->proto.httpc; in Curl_http2_switched() local
1259 httpc->recv_underlying = (recving)conn->recv[FIRSTSOCKET]; in Curl_http2_switched()
1260 httpc->send_underlying = (sending)conn->send[FIRSTSOCKET]; in Curl_http2_switched()
1268 rv = nghttp2_session_upgrade(httpc->h2, httpc->binsettings, in Curl_http2_switched()
1269 httpc->binlen, NULL); in Curl_http2_switched()
1277 if(!Curl_hash_add(&httpc->streamsh, &stream->stream_id, in Curl_http2_switched()
1286 rv = nghttp2_submit_settings(httpc->h2, NGHTTP2_FLAG_NONE, NULL, 0); in Curl_http2_switched()
1309 memcpy(httpc->inbuf, mem, nread); in Curl_http2_switched()
1310 httpc->inbuflen = nread; in Curl_http2_switched()
1312 nproc = nghttp2_session_mem_recv(httpc->h2, (const uint8_t *)httpc->inbuf, in Curl_http2_switched()
1313 httpc->inbuflen); in Curl_http2_switched()
1324 httpc->inbuflen = 0; in Curl_http2_switched()
1325 httpc->nread_inbuf = 0; in Curl_http2_switched()
1328 httpc->nread_inbuf += nproc; in Curl_http2_switched()
1332 rv = nghttp2_session_send(httpc->h2); in Curl_http2_switched()