File tree Expand file tree Collapse file tree 3 files changed +14
-26
lines changed Expand file tree Collapse file tree 3 files changed +14
-26
lines changed Original file line number Diff line number Diff line change 11
11
#define BOOST_HTTP_IO_DETAIL_EXCEPT_HPP
12
12
13
13
#include < boost/assert/source_location.hpp>
14
+ #include < boost/http_io/detail/config.hpp>
14
15
15
16
namespace boost {
16
17
namespace http_io {
Original file line number Diff line number Diff line change 16
16
#include < boost/asio/append.hpp>
17
17
#include < boost/asio/compose.hpp>
18
18
#include < boost/asio/coroutine.hpp>
19
- #include < boost/asio/post .hpp>
19
+ #include < boost/asio/immediate .hpp>
20
20
#include < boost/assert.hpp>
21
- #include < type_traits>
22
21
23
22
namespace boost {
24
23
namespace http_io {
@@ -57,13 +56,9 @@ class read_header_op
57
56
{
58
57
BOOST_ASIO_HANDLER_LOCATION ((
59
58
__FILE__, __LINE__,
60
- " post" ));
61
- asio::post (
62
- stream_.get_executor (),
63
- asio::append (
64
- std::move (self),
65
- ec,
66
- 0 ));
59
+ " immediate" ));
60
+ asio::async_immediate (
61
+ self.get_io_executor (), std::move (self));
67
62
}
68
63
goto upcall;
69
64
}
@@ -145,13 +140,9 @@ class read_body_op
145
140
{
146
141
BOOST_ASIO_HANDLER_LOCATION ((
147
142
__FILE__, __LINE__,
148
- " post" ));
149
- asio::post (
150
- stream_.get_executor (),
151
- asio::append (
152
- std::move (self),
153
- ec,
154
- 0 ));
143
+ " immediate" ));
144
+ asio::async_immediate (
145
+ self.get_io_executor (), std::move (self));
155
146
}
156
147
goto upcall;
157
148
}
Original file line number Diff line number Diff line change 14
14
#include < boost/asio/buffer.hpp>
15
15
#include < boost/asio/compose.hpp>
16
16
#include < boost/asio/coroutine.hpp>
17
- #include < boost/asio/post .hpp>
17
+ #include < boost/asio/immediate .hpp>
18
18
#include < boost/system/error_code.hpp>
19
19
#include < boost/system/result.hpp>
20
- #include < iterator >
20
+ #include < boost/http_proto/serializer.hpp >
21
21
22
22
namespace boost {
23
23
namespace http_io {
@@ -54,8 +54,8 @@ class write_some_op
54
54
void
55
55
operator ()(
56
56
Self& self,
57
- system::error_code ec,
58
- std::size_t bytes_transferred,
57
+ system::error_code ec = {} ,
58
+ std::size_t bytes_transferred = {} ,
59
59
bool do_post = false )
60
60
{
61
61
system::result<buffers_type> rv;
@@ -73,12 +73,8 @@ class write_some_op
73
73
BOOST_ASIO_HANDLER_LOCATION ((
74
74
__FILE__, __LINE__,
75
75
" http_io::write_some_op" ));
76
- asio::post (
77
- dest_.get_executor (),
78
- asio::append (
79
- std::move (self),
80
- ec,
81
- bytes_transferred));
76
+ asio::async_immediate (
77
+ self.get_io_executor (), std::move (self));
82
78
}
83
79
goto upcall;
84
80
}
You can’t perform that action at this time.
0 commit comments