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
8accf389
Commit
8accf389
authored
Mar 05, 2015
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asio: Add client::request::resume() member function
parent
690a1622
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
18 additions
and
0 deletions
+18
-0
src/asio_client_request.cc
src/asio_client_request.cc
+2
-0
src/asio_client_request_impl.cc
src/asio_client_request_impl.cc
+2
-0
src/asio_client_request_impl.h
src/asio_client_request_impl.h
+2
-0
src/asio_client_session_impl.cc
src/asio_client_session_impl.cc
+5
-0
src/asio_client_session_impl.h
src/asio_client_session_impl.h
+1
-0
src/asio_client_stream.cc
src/asio_client_stream.cc
+2
-0
src/asio_client_stream.h
src/asio_client_stream.h
+1
-0
src/includes/nghttp2/asio_http2_client.h
src/includes/nghttp2/asio_http2_client.h
+3
-0
No files found.
src/asio_client_request.cc
View file @
8accf389
...
@@ -54,6 +54,8 @@ const std::string &request::method() const { return impl_->method(); }
...
@@ -54,6 +54,8 @@ const std::string &request::method() const { return impl_->method(); }
const
header_map
&
request
::
header
()
const
{
return
impl_
->
header
();
}
const
header_map
&
request
::
header
()
const
{
return
impl_
->
header
();
}
void
request
::
resume
()
const
{
impl_
->
resume
();
}
request_impl
&
request
::
impl
()
const
{
return
*
impl_
;
}
request_impl
&
request
::
impl
()
const
{
return
*
impl_
;
}
}
// namespace client
}
// namespace client
...
...
src/asio_client_request_impl.cc
View file @
8accf389
...
@@ -72,6 +72,8 @@ read_cb::result_type request_impl::call_on_read(uint8_t *buf, std::size_t len,
...
@@ -72,6 +72,8 @@ read_cb::result_type request_impl::call_on_read(uint8_t *buf, std::size_t len,
return
0
;
return
0
;
}
}
void
request_impl
::
resume
()
{
strm_
->
resume
();
}
void
request_impl
::
header
(
header_map
h
)
{
header_
=
std
::
move
(
h
);
}
void
request_impl
::
header
(
header_map
h
)
{
header_
=
std
::
move
(
h
);
}
header_map
&
request_impl
::
header
()
{
return
header_
;
}
header_map
&
request_impl
::
header
()
{
return
header_
;
}
...
...
src/asio_client_request_impl.h
View file @
8accf389
...
@@ -58,6 +58,8 @@ public:
...
@@ -58,6 +58,8 @@ public:
read_cb
::
result_type
call_on_read
(
uint8_t
*
buf
,
std
::
size_t
len
,
read_cb
::
result_type
call_on_read
(
uint8_t
*
buf
,
std
::
size_t
len
,
uint32_t
*
data_flags
);
uint32_t
*
data_flags
);
void
resume
();
void
header
(
header_map
h
);
void
header
(
header_map
h
);
header_map
&
header
();
header_map
&
header
();
const
header_map
&
header
()
const
;
const
header_map
&
header
()
const
;
...
...
src/asio_client_session_impl.cc
View file @
8accf389
...
@@ -327,6 +327,11 @@ void session_impl::cancel(stream &strm, uint32_t error_code) {
...
@@ -327,6 +327,11 @@ void session_impl::cancel(stream &strm, uint32_t error_code) {
signal_write
();
signal_write
();
}
}
void
session_impl
::
resume
(
stream
&
strm
)
{
nghttp2_session_resume_data
(
session_
,
strm
.
stream_id
());
signal_write
();
}
stream
*
session_impl
::
find_stream
(
int32_t
stream_id
)
{
stream
*
session_impl
::
find_stream
(
int32_t
stream_id
)
{
auto
it
=
streams_
.
find
(
stream_id
);
auto
it
=
streams_
.
find
(
stream_id
);
if
(
it
==
std
::
end
(
streams_
))
{
if
(
it
==
std
::
end
(
streams_
))
{
...
...
src/asio_client_session_impl.h
View file @
8accf389
...
@@ -54,6 +54,7 @@ public:
...
@@ -54,6 +54,7 @@ public:
const
error_cb
&
on_error
()
const
;
const
error_cb
&
on_error
()
const
;
void
cancel
(
stream
&
strm
,
uint32_t
error_code
);
void
cancel
(
stream
&
strm
,
uint32_t
error_code
);
void
resume
(
stream
&
strm
);
std
::
unique_ptr
<
stream
>
create_stream
();
std
::
unique_ptr
<
stream
>
create_stream
();
std
::
unique_ptr
<
stream
>
pop_stream
(
int32_t
stream_id
);
std
::
unique_ptr
<
stream
>
pop_stream
(
int32_t
stream_id
);
...
...
src/asio_client_stream.cc
View file @
8accf389
...
@@ -38,6 +38,8 @@ stream::stream(session_impl *sess) : sess_(sess), stream_id_(0) {
...
@@ -38,6 +38,8 @@ stream::stream(session_impl *sess) : sess_(sess), stream_id_(0) {
void
stream
::
cancel
(
uint32_t
error_code
)
{
sess_
->
cancel
(
*
this
,
error_code
);
}
void
stream
::
cancel
(
uint32_t
error_code
)
{
sess_
->
cancel
(
*
this
,
error_code
);
}
void
stream
::
resume
()
{
sess_
->
resume
(
*
this
);
}
void
stream
::
stream_id
(
int32_t
stream_id
)
{
stream_id_
=
stream_id
;
}
void
stream
::
stream_id
(
int32_t
stream_id
)
{
stream_id_
=
stream_id
;
}
int32_t
stream
::
stream_id
()
const
{
return
stream_id_
;
}
int32_t
stream
::
stream_id
()
const
{
return
stream_id_
;
}
...
...
src/asio_client_stream.h
View file @
8accf389
...
@@ -45,6 +45,7 @@ public:
...
@@ -45,6 +45,7 @@ public:
stream
&
operator
=
(
const
stream
&
)
=
delete
;
stream
&
operator
=
(
const
stream
&
)
=
delete
;
void
cancel
(
uint32_t
error_code
);
void
cancel
(
uint32_t
error_code
);
void
resume
();
void
stream_id
(
int32_t
stream_id
);
void
stream_id
(
int32_t
stream_id
);
int32_t
stream_id
()
const
;
int32_t
stream_id
()
const
;
...
...
src/includes/nghttp2/asio_http2_client.h
View file @
8accf389
...
@@ -74,6 +74,9 @@ public:
...
@@ -74,6 +74,9 @@ public:
void
cancel
(
uint32_t
error_code
=
NGHTTP2_INTERNAL_ERROR
)
const
;
void
cancel
(
uint32_t
error_code
=
NGHTTP2_INTERNAL_ERROR
)
const
;
// Resumes deferred uploading.
void
resume
()
const
;
const
std
::
string
&
method
()
const
;
const
std
::
string
&
method
()
const
;
const
uri_ref
&
uri
()
const
;
const
uri_ref
&
uri
()
const
;
...
...
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