diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-01-04 09:36:41 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-01-04 16:14:41 +0100 |
commit | 94cb27290874c034c65af7d89083e5fafcce0e25 (patch) | |
tree | 0714d41c5ac7b6b4c92aacca19b001007206f1e2 /lib/c-hyper.c | |
parent | aa8de5d6ee457456ce665282d1bf5d74648683dc (diff) | |
download | curl-bagder/hyper-CONNECT.tar.gz |
http_proxy: make CONNECT work with the Hyper backendbagder/hyper-CONNECT
Makes test 80 run
Diffstat (limited to 'lib/c-hyper.c')
-rw-r--r-- | lib/c-hyper.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/c-hyper.c b/lib/c-hyper.c index b6eb7466d..3a81db95f 100644 --- a/lib/c-hyper.c +++ b/lib/c-hyper.c @@ -57,8 +57,8 @@ #include "curl_memory.h" #include "memdebug.h" -static size_t read_cb(void *userp, hyper_context *ctx, - uint8_t *buf, size_t buflen) +size_t Curl_hyper_recv(void *userp, hyper_context *ctx, + uint8_t *buf, size_t buflen) { struct connectdata *conn = (struct connectdata *)userp; struct Curl_easy *data = conn->data; @@ -86,7 +86,7 @@ static size_t read_cb(void *userp, hyper_context *ctx, return (size_t)nread; } -static size_t write_cb(void *userp, hyper_context *ctx, +size_t Curl_hyper_send(void *userp, hyper_context *ctx, const uint8_t *buf, size_t buflen) { struct connectdata *conn = (struct connectdata *)userp; @@ -256,11 +256,11 @@ static CURLcode empty_header(struct Curl_easy *data) CURLE_WRITE_ERROR : CURLE_OK; } -static CURLcode hyperstream(struct Curl_easy *data, - struct connectdata *conn, - int *didwhat, - bool *done, - int select_res) +CURLcode Curl_hyper_stream(struct Curl_easy *data, + struct connectdata *conn, + int *didwhat, + bool *done, + int select_res) { hyper_response *resp = NULL; uint16_t http_status; @@ -692,8 +692,8 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) } /* tell Hyper how to read/write network data */ hyper_io_set_userdata(io, conn); - hyper_io_set_read(io, read_cb); - hyper_io_set_write(io, write_cb); + hyper_io_set_read(io, Curl_hyper_recv); + hyper_io_set_write(io, Curl_hyper_send); /* create an executor to poll futures */ if(!h->exec) { @@ -868,7 +868,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) Curl_pgrsSetUploadSize(data, 0); /* nothing */ Curl_setup_transfer(data, FIRSTSOCKET, -1, TRUE, -1); } - conn->datastream = hyperstream; + conn->datastream = Curl_hyper_stream; return CURLE_OK; error: |