• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/curl/curl-7.36.0/lib/

Lines Matching refs:httpc

53   const struct http_conn *httpc = &conn->proto.httpc;
61 if(nghttp2_session_want_read(httpc->h2))
64 if(nghttp2_session_want_write(httpc->h2))
81 struct http_conn *httpc = &conn->proto.httpc;
86 nghttp2_session_del(httpc->h2);
88 Curl_safefree(httpc->header_recvbuf->buffer);
89 Curl_safefree(httpc->header_recvbuf);
91 Curl_safefree(httpc->inbuf);
163 struct http_conn *httpc = &conn->proto.httpc;
170 written = ((Curl_send*)httpc->send_underlying)(conn, FIRSTSOCKET,
192 struct http_conn *c = &conn->proto.httpc;
240 struct http_conn *c = &conn->proto.httpc;
273 struct http_conn *c = &conn->proto.httpc;
309 struct http_conn *c = &conn->proto.httpc;
357 struct http_conn *c = &conn->proto.httpc;
412 struct http_conn *c = &conn->proto.httpc;
450 if(!conn->proto.httpc.h2) {
452 conn->proto.httpc.inbuf = malloc(H2_BUFSIZE);
453 if(conn->proto.httpc.inbuf == NULL)
457 rc = nghttp2_session_client_new(&conn->proto.httpc.h2,
487 uint8_t *binsettings = conn->proto.httpc.binsettings;
504 conn->proto.httpc.binlen = binlen;
533 struct http_conn *httpc = &conn->proto.httpc;
537 if(httpc->closed) {
543 httpc->upload_mem = NULL;
544 httpc->upload_len = 0;
546 if(httpc->bodystarted &&
547 httpc->nread_header_recvbuf < httpc->header_recvbuf->size_used) {
549 httpc->header_recvbuf->size_used - httpc->nread_header_recvbuf;
551 memcpy(mem, httpc->header_recvbuf->buffer + httpc->nread_header_recvbuf,
553 httpc->nread_header_recvbuf += ncopy;
557 if(httpc->data) {
558 nread = len < httpc->datalen ? len : httpc->datalen;
559 memcpy(mem, httpc->data, nread);
561 httpc->data += nread;
562 httpc->datalen -= nread;
565 if(httpc->datalen == 0) {
566 httpc->data = NULL;
567 httpc->datalen = 0;
572 conn->proto.httpc.mem = mem;
573 conn->proto.httpc.len = len;
576 conn->proto.httpc.len);
579 nread = ((Curl_recv*)httpc->recv_underlying)(conn, FIRSTSOCKET,
580 httpc->inbuf, H2_BUFSIZE, &rc);
594 rv = nghttp2_session_mem_recv(httpc->h2,
595 (const uint8_t *)httpc->inbuf, nread);
606 rv = nghttp2_session_send(httpc->h2);
611 if(len != httpc->len) {
612 return len - conn->proto.httpc.len;
616 if(httpc->closed) {
639 struct http_conn *httpc = &conn->proto.httpc;
650 if(httpc->stream_id != -1) {
653 httpc->upload_mem = mem;
654 httpc->upload_len = len;
655 nghttp2_session_resume_data(httpc->h2, httpc->stream_id);
656 rv = nghttp2_session_send(httpc->h2);
661 return len - httpc->upload_len;
734 httpc->upload_left *= 10;
735 httpc->upload_left += nva[i].value[j] - '0';
737 infof(conn->data, "request content-length=%zu\n", httpc->upload_left);
747 rv = nghttp2_submit_request(httpc->h2, 0, nva, nheader, &data_prd, NULL);
750 rv = nghttp2_submit_request(httpc->h2, 0, nva, nheader, NULL, NULL);
760 rv = nghttp2_session_send(httpc->h2);
767 if(httpc->stream_id != -1) {
776 nghttp2_session_resume_data(httpc->h2, httpc->stream_id);
786 struct http_conn *httpc = &conn->proto.httpc;
795 httpc->recv_underlying = (recving)conn->recv[FIRSTSOCKET];
796 httpc->send_underlying = (sending)conn->send[FIRSTSOCKET];
800 httpc->bodystarted = FALSE;
801 httpc->closed = FALSE;
802 httpc->header_recvbuf = Curl_add_buffer_init();
803 httpc->nread_header_recvbuf = 0;
804 httpc->data = NULL;
805 httpc->datalen = 0;
806 httpc->upload_left = 0;
807 httpc->upload_mem = NULL;
808 httpc->upload_len = 0;
813 Curl_add_buffer(httpc->header_recvbuf, "HTTP/2.0 200\r\n", 14);
816 rv = (int) ((Curl_send*)httpc->send_underlying)
824 httpc->stream_id = 1;
826 rv = nghttp2_session_upgrade(httpc->h2, httpc->binsettings,
827 httpc->binlen, NULL);
836 httpc->stream_id = -1;
837 rv = nghttp2_submit_settings(httpc->h2, NGHTTP2_FLAG_NONE, NULL, 0);