Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
nghttp2
Commits
9e089521
Commit
9e089521
authored
Aug 31, 2019
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing acked_stream_data_offset callback
parent
b912b626
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
1 deletion
+32
-1
src/h2load.h
src/h2load.h
+1
-0
src/h2load_http3_session.cc
src/h2load_http3_session.cc
+9
-0
src/h2load_http3_session.h
src/h2load_http3_session.h
+1
-0
src/h2load_quic.cc
src/h2load_quic.cc
+21
-1
No files found.
src/h2load.h
View file @
9e089521
...
...
@@ -461,6 +461,7 @@ struct Client {
int
quic_handshake_completed
();
int
quic_recv_stream_data
(
int64_t
stream_id
,
int
fin
,
const
uint8_t
*
data
,
size_t
datalen
);
int
quic_acked_stream_data_offset
(
int64_t
stream_id
,
size_t
datalen
);
int
quic_stream_close
(
int64_t
stream_id
,
uint64_t
app_error_code
);
int
quic_stream_reset
(
int64_t
stream_id
,
uint64_t
app_error_code
);
int
quic_extend_max_local_streams
();
...
...
src/h2load_http3_session.cc
View file @
9e089521
...
...
@@ -373,4 +373,13 @@ int Http3Session::add_write_offset(int64_t stream_id, size_t ndatalen) {
return
0
;
}
int
Http3Session
::
add_ack_offset
(
int64_t
stream_id
,
size_t
datalen
)
{
auto
rv
=
nghttp3_conn_add_ack_offset
(
conn_
,
stream_id
,
datalen
);
if
(
rv
!=
0
)
{
client_
->
quic
.
last_error
=
quic
::
err_application
(
rv
);
return
-
1
;
}
return
0
;
}
}
// namespace h2load
src/h2load_http3_session.h
View file @
9e089521
...
...
@@ -64,6 +64,7 @@ public:
size_t
veccnt
);
int
block_stream
(
int64_t
stream_id
);
int
add_write_offset
(
int64_t
stream_id
,
size_t
ndatalen
);
int
add_ack_offset
(
int64_t
stream_id
,
size_t
datalen
);
private:
Client
*
client_
;
...
...
src/h2load_quic.cc
View file @
9e089521
...
...
@@ -126,6 +126,26 @@ int Client::quic_recv_stream_data(int64_t stream_id, int fin,
return
0
;
}
namespace
{
int
acked_stream_data_offset
(
ngtcp2_conn
*
conn
,
int64_t
stream_id
,
uint64_t
offset
,
size_t
datalen
,
void
*
user_data
,
void
*
stream_user_data
)
{
auto
c
=
static_cast
<
Client
*>
(
user_data
);
if
(
c
->
quic_acked_stream_data_offset
(
stream_id
,
datalen
)
!=
0
)
{
return
NGTCP2_ERR_CALLBACK_FAILURE
;
}
return
0
;
}
}
// namespace
int
Client
::
quic_acked_stream_data_offset
(
int64_t
stream_id
,
size_t
datalen
)
{
auto
s
=
static_cast
<
Http3Session
*>
(
session
.
get
());
if
(
s
->
add_ack_offset
(
stream_id
,
datalen
)
!=
0
)
{
return
-
1
;
}
return
0
;
}
namespace
{
int
stream_close
(
ngtcp2_conn
*
conn
,
int64_t
stream_id
,
uint64_t
app_error_code
,
void
*
user_data
,
void
*
stream_user_data
)
{
...
...
@@ -331,7 +351,7 @@ int Client::quic_init(const sockaddr *local_addr, socklen_t local_addrlen,
ngtcp2_crypto_hp_mask_cb
,
h2load
::
recv_stream_data
,
nullptr
,
// acked_crypto_offset
nullptr
,
// acked_stream_data_offset
h2load
::
acked_stream_data_offset
,
nullptr
,
// stream_open
h2load
::
stream_close
,
nullptr
,
// recv_stateless_reset
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment