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
58afce23
Commit
58afce23
authored
Aug 10, 2014
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttp: Verbose output for received DATA chunk with current received window
parent
24cfb52b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
1 deletion
+28
-1
src/app_helper.cc
src/app_helper.cc
+19
-1
src/app_helper.h
src/app_helper.h
+4
-0
src/nghttp.cc
src/nghttp.cc
+5
-0
No files found.
src/app_helper.cc
View file @
58afce23
...
...
@@ -443,10 +443,11 @@ int verbose_on_header_callback(nghttp2_session *session,
};
print_timer
();
fprintf
(
outfile
,
" (stream_id=%d, noind=%d) "
,
frame
->
hd
.
stream_id
,
fprintf
(
outfile
,
"
recv
(stream_id=%d, noind=%d) "
,
frame
->
hd
.
stream_id
,
(
flags
&
NGHTTP2_NV_FLAG_NO_INDEX
)
!=
0
);
print_nv
(
&
nv
);
fflush
(
outfile
);
return
0
;
}
...
...
@@ -509,6 +510,23 @@ int verbose_on_frame_send_callback
return
0
;
}
int
verbose_on_data_chunk_recv_callback
(
nghttp2_session
*
session
,
uint8_t
flags
,
int32_t
stream_id
,
const
uint8_t
*
data
,
size_t
len
,
void
*
user_data
)
{
print_timer
();
auto
srecv
=
nghttp2_session_get_stream_effective_recv_data_length
(
session
,
stream_id
);
auto
crecv
=
nghttp2_session_get_effective_recv_data_length
(
session
);
fprintf
(
outfile
,
" recv (stream_id=%d, length=%zu, srecv=%d, crecv=%d) DATA
\n
"
,
stream_id
,
len
,
srecv
,
crecv
);
fflush
(
outfile
);
return
0
;
}
namespace
{
std
::
chrono
::
steady_clock
::
time_point
base_tv
;
}
// namespace
...
...
src/app_helper.h
View file @
58afce23
...
...
@@ -63,6 +63,10 @@ int verbose_on_unknown_frame_recv_callback(nghttp2_session *session,
int
verbose_on_frame_send_callback
(
nghttp2_session
*
session
,
const
nghttp2_frame
*
frame
,
void
*
user_data
);
int
verbose_on_data_chunk_recv_callback
(
nghttp2_session
*
session
,
uint8_t
flags
,
int32_t
stream_id
,
const
uint8_t
*
data
,
size_t
len
,
void
*
user_data
);
// Returns difference between |a| and |b| in milliseconds, assuming
// |a| is more recent than |b|.
template
<
typename
TimePoint
>
...
...
src/nghttp.cc
View file @
58afce23
...
...
@@ -1135,6 +1135,11 @@ int on_data_chunk_recv_callback
return
0
;
}
if
(
config
.
verbose
)
{
verbose_on_data_chunk_recv_callback
(
session
,
flags
,
stream_id
,
data
,
len
,
user_data
);
}
if
(
req
->
status
==
0
)
{
nghttp2_submit_rst_stream
(
session
,
NGHTTP2_FLAG_NONE
,
stream_id
,
NGHTTP2_PROTOCOL_ERROR
);
...
...
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