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
6f3ce2c7
Commit
6f3ce2c7
authored
Apr 03, 2018
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
examples: Remove unused lambda capture
parent
2f9121cf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
examples/asio-cl.cc
examples/asio-cl.cc
+2
-2
examples/asio-cl2.cc
examples/asio-cl2.cc
+3
-3
No files found.
examples/asio-cl.cc
View file @
6f3ce2c7
...
...
@@ -67,14 +67,14 @@ int main(int argc, char *argv[]) {
return
;
}
req
->
on_response
([
&
sess
](
const
response
&
res
)
{
req
->
on_response
([](
const
response
&
res
)
{
std
::
cerr
<<
"HTTP/2 "
<<
res
.
status_code
()
<<
std
::
endl
;
for
(
auto
&
kv
:
res
.
header
())
{
std
::
cerr
<<
kv
.
first
<<
": "
<<
kv
.
second
.
value
<<
"
\n
"
;
}
std
::
cerr
<<
std
::
endl
;
res
.
on_data
([
&
sess
](
const
uint8_t
*
data
,
std
::
size_t
len
)
{
res
.
on_data
([](
const
uint8_t
*
data
,
std
::
size_t
len
)
{
std
::
cerr
.
write
(
reinterpret_cast
<
const
char
*>
(
data
),
len
);
std
::
cerr
<<
std
::
endl
;
});
...
...
examples/asio-cl2.cc
View file @
6f3ce2c7
...
...
@@ -91,17 +91,17 @@ int main(int argc, char *argv[]) {
return
;
}
req
->
on_response
([
&
sess
,
req
](
const
response
&
res
)
{
req
->
on_response
([](
const
response
&
res
)
{
std
::
cerr
<<
"response header was received"
<<
std
::
endl
;
print_header
(
res
);
res
.
on_data
([
&
sess
](
const
uint8_t
*
data
,
std
::
size_t
len
)
{
res
.
on_data
([](
const
uint8_t
*
data
,
std
::
size_t
len
)
{
std
::
cerr
.
write
(
reinterpret_cast
<
const
char
*>
(
data
),
len
);
std
::
cerr
<<
std
::
endl
;
});
});
req
->
on_close
([
&
sess
](
uint32_t
error_code
)
{
req
->
on_close
([](
uint32_t
error_code
)
{
std
::
cerr
<<
"request done with error_code="
<<
error_code
<<
std
::
endl
;
});
...
...
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