Rename send_stop_sending to stop_sending
This commit is contained in:
parent
2aed077761
commit
d14d97ab68
|
@ -213,19 +213,17 @@ void Http3Session::recv_header(int64_t stream_id, const nghttp3_vec *name,
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
int send_stop_sending(nghttp3_conn *conn, int64_t stream_id,
|
int stop_sending(nghttp3_conn *conn, int64_t stream_id, uint64_t app_error_code,
|
||||||
uint64_t app_error_code, void *user_data,
|
void *user_data, void *stream_user_data) {
|
||||||
void *stream_user_data) {
|
|
||||||
auto s = static_cast<Http3Session *>(user_data);
|
auto s = static_cast<Http3Session *>(user_data);
|
||||||
if (s->send_stop_sending(stream_id, app_error_code) != 0) {
|
if (s->stop_sending(stream_id, app_error_code) != 0) {
|
||||||
return NGHTTP3_ERR_CALLBACK_FAILURE;
|
return NGHTTP3_ERR_CALLBACK_FAILURE;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
int Http3Session::send_stop_sending(int64_t stream_id,
|
int Http3Session::stop_sending(int64_t stream_id, uint64_t app_error_code) {
|
||||||
uint64_t app_error_code) {
|
|
||||||
auto rv = ngtcp2_conn_shutdown_stream_read(client_->quic.conn, stream_id,
|
auto rv = ngtcp2_conn_shutdown_stream_read(client_->quic.conn, stream_id,
|
||||||
app_error_code);
|
app_error_code);
|
||||||
if (rv != 0) {
|
if (rv != 0) {
|
||||||
|
@ -300,7 +298,7 @@ int Http3Session::init_conn() {
|
||||||
nullptr, // begin_trailers
|
nullptr, // begin_trailers
|
||||||
h2load::recv_header,
|
h2load::recv_header,
|
||||||
nullptr, // end_trailers
|
nullptr, // end_trailers
|
||||||
h2load::send_stop_sending,
|
h2load::stop_sending,
|
||||||
};
|
};
|
||||||
|
|
||||||
auto config = client_->worker->config;
|
auto config = client_->worker->config;
|
||||||
|
|
|
@ -51,7 +51,7 @@ public:
|
||||||
void begin_headers(int64_t stream_id);
|
void begin_headers(int64_t stream_id);
|
||||||
void recv_header(int64_t stream_id, const nghttp3_vec *name,
|
void recv_header(int64_t stream_id, const nghttp3_vec *name,
|
||||||
const nghttp3_vec *value);
|
const nghttp3_vec *value);
|
||||||
int send_stop_sending(int64_t stream_id, uint64_t app_error_code);
|
int stop_sending(int64_t stream_id, uint64_t app_error_code);
|
||||||
|
|
||||||
int close_stream(int64_t stream_id, uint64_t app_error_code);
|
int close_stream(int64_t stream_id, uint64_t app_error_code);
|
||||||
int shutdown_stream_read(int64_t stream_id);
|
int shutdown_stream_read(int64_t stream_id);
|
||||||
|
|
|
@ -2353,12 +2353,12 @@ int Http3Upstream::http_stream_close(Downstream *downstream,
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
int http_send_stop_sending(nghttp3_conn *conn, int64_t stream_id,
|
int http_stop_sending(nghttp3_conn *conn, int64_t stream_id,
|
||||||
uint64_t app_error_code, void *user_data,
|
uint64_t app_error_code, void *user_data,
|
||||||
void *stream_user_data) {
|
void *stream_user_data) {
|
||||||
auto upstream = static_cast<Http3Upstream *>(user_data);
|
auto upstream = static_cast<Http3Upstream *>(user_data);
|
||||||
|
|
||||||
if (upstream->http_send_stop_sending(stream_id, app_error_code) != 0) {
|
if (upstream->http_stop_sending(stream_id, app_error_code) != 0) {
|
||||||
return NGHTTP3_ERR_CALLBACK_FAILURE;
|
return NGHTTP3_ERR_CALLBACK_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2366,8 +2366,8 @@ int http_send_stop_sending(nghttp3_conn *conn, int64_t stream_id,
|
||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
int Http3Upstream::http_send_stop_sending(int64_t stream_id,
|
int Http3Upstream::http_stop_sending(int64_t stream_id,
|
||||||
uint64_t app_error_code) {
|
uint64_t app_error_code) {
|
||||||
auto rv = ngtcp2_conn_shutdown_stream_read(conn_, stream_id, app_error_code);
|
auto rv = ngtcp2_conn_shutdown_stream_read(conn_, stream_id, app_error_code);
|
||||||
if (ngtcp2_err_is_fatal(rv)) {
|
if (ngtcp2_err_is_fatal(rv)) {
|
||||||
ULOG(ERROR, this) << "ngtcp2_conn_shutdown_stream_read: "
|
ULOG(ERROR, this) << "ngtcp2_conn_shutdown_stream_read: "
|
||||||
|
@ -2422,7 +2422,7 @@ int Http3Upstream::setup_httpconn() {
|
||||||
nullptr, // begin_trailers
|
nullptr, // begin_trailers
|
||||||
nullptr, // recv_trailer
|
nullptr, // recv_trailer
|
||||||
nullptr, // end_trailers
|
nullptr, // end_trailers
|
||||||
shrpx::http_send_stop_sending,
|
shrpx::http_stop_sending,
|
||||||
shrpx::http_end_stream,
|
shrpx::http_end_stream,
|
||||||
shrpx::http_reset_stream,
|
shrpx::http_reset_stream,
|
||||||
};
|
};
|
||||||
|
|
|
@ -141,7 +141,7 @@ public:
|
||||||
int http_acked_stream_data(Downstream *downstream, uint64_t datalen);
|
int http_acked_stream_data(Downstream *downstream, uint64_t datalen);
|
||||||
int http_shutdown_stream_read(int64_t stream_id);
|
int http_shutdown_stream_read(int64_t stream_id);
|
||||||
int http_reset_stream(int64_t stream_id, uint64_t app_error_code);
|
int http_reset_stream(int64_t stream_id, uint64_t app_error_code);
|
||||||
int http_send_stop_sending(int64_t stream_id, uint64_t app_error_code);
|
int http_stop_sending(int64_t stream_id, uint64_t app_error_code);
|
||||||
int http_recv_data(Downstream *downstream, const uint8_t *data,
|
int http_recv_data(Downstream *downstream, const uint8_t *data,
|
||||||
size_t datalen);
|
size_t datalen);
|
||||||
int handshake_completed();
|
int handshake_completed();
|
||||||
|
|
Loading…
Reference in New Issue