mirror of
https://github.com/curl/curl.git
synced 2025-01-30 14:22:33 +08:00
parent
5622e431ed
commit
3b7a8a25b6
@ -739,6 +739,17 @@ static void cf_msh3_active(struct Curl_cfilter *cf, struct Curl_easy *data)
|
||||
ctx->active = TRUE;
|
||||
}
|
||||
|
||||
static CURLcode h3_data_pause(struct Curl_cfilter *cf,
|
||||
struct Curl_easy *data,
|
||||
bool pause)
|
||||
{
|
||||
if(!pause) {
|
||||
drain_stream(cf, data);
|
||||
Curl_expire(data, 0, EXPIRE_RUN_NOW);
|
||||
}
|
||||
return CURLE_OK;
|
||||
}
|
||||
|
||||
static CURLcode cf_msh3_data_event(struct Curl_cfilter *cf,
|
||||
struct Curl_easy *data,
|
||||
int event, int arg1, void *arg2)
|
||||
@ -755,6 +766,9 @@ static CURLcode cf_msh3_data_event(struct Curl_cfilter *cf,
|
||||
case CF_CTRL_DATA_SETUP:
|
||||
result = h3_data_setup(cf, data);
|
||||
break;
|
||||
case CF_CTRL_DATA_PAUSE:
|
||||
result = h3_data_pause(cf, data, (arg1 != 0));
|
||||
break;
|
||||
case CF_CTRL_DATA_DONE:
|
||||
h3_data_done(cf, data);
|
||||
break;
|
||||
|
@ -2096,6 +2096,19 @@ static bool cf_ngtcp2_data_pending(struct Curl_cfilter *cf,
|
||||
return stream && !Curl_bufq_is_empty(&stream->recvbuf);
|
||||
}
|
||||
|
||||
static CURLcode h3_data_pause(struct Curl_cfilter *cf,
|
||||
struct Curl_easy *data,
|
||||
bool pause)
|
||||
{
|
||||
/* TODO: there seems right now no API in ngtcp2 to shrink/enlarge
|
||||
* the streams windows. As we do in HTTP/2. */
|
||||
if(!pause) {
|
||||
drain_stream(cf, data);
|
||||
Curl_expire(data, 0, EXPIRE_RUN_NOW);
|
||||
}
|
||||
return CURLE_OK;
|
||||
}
|
||||
|
||||
static CURLcode cf_ngtcp2_data_event(struct Curl_cfilter *cf,
|
||||
struct Curl_easy *data,
|
||||
int event, int arg1, void *arg2)
|
||||
@ -2110,6 +2123,9 @@ static CURLcode cf_ngtcp2_data_event(struct Curl_cfilter *cf,
|
||||
switch(event) {
|
||||
case CF_CTRL_DATA_SETUP:
|
||||
break;
|
||||
case CF_CTRL_DATA_PAUSE:
|
||||
result = h3_data_pause(cf, data, (arg1 != 0));
|
||||
break;
|
||||
case CF_CTRL_DATA_DONE: {
|
||||
h3_data_done(cf, data);
|
||||
break;
|
||||
|
@ -1114,6 +1114,19 @@ static bool cf_quiche_data_pending(struct Curl_cfilter *cf,
|
||||
return stream && !Curl_bufq_is_empty(&stream->recvbuf);
|
||||
}
|
||||
|
||||
static CURLcode h3_data_pause(struct Curl_cfilter *cf,
|
||||
struct Curl_easy *data,
|
||||
bool pause)
|
||||
{
|
||||
/* TODO: there seems right now no API in quiche to shrink/enlarge
|
||||
* the streams windows. As we do in HTTP/2. */
|
||||
if(!pause) {
|
||||
drain_stream(cf, data);
|
||||
Curl_expire(data, 0, EXPIRE_RUN_NOW);
|
||||
}
|
||||
return CURLE_OK;
|
||||
}
|
||||
|
||||
static CURLcode cf_quiche_data_event(struct Curl_cfilter *cf,
|
||||
struct Curl_easy *data,
|
||||
int event, int arg1, void *arg2)
|
||||
@ -1127,6 +1140,9 @@ static CURLcode cf_quiche_data_event(struct Curl_cfilter *cf,
|
||||
result = h3_data_setup(cf, data);
|
||||
break;
|
||||
}
|
||||
case CF_CTRL_DATA_PAUSE:
|
||||
result = h3_data_pause(cf, data, (arg1 != 0));
|
||||
break;
|
||||
case CF_CTRL_DATA_DONE: {
|
||||
h3_data_done(cf, data);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user