mirror of
https://github.com/boostorg/beast.git
synced 2025-08-02 14:24:31 +02:00
@@ -1,5 +1,6 @@
|
|||||||
Version XXX:
|
Version XXX:
|
||||||
|
|
||||||
|
* examples use strands correctly
|
||||||
* update root certificates in examples
|
* update root certificates in examples
|
||||||
* clarify end-of-file behaviour in File::read docs
|
* clarify end-of-file behaviour in File::read docs
|
||||||
* file_body returns short_read on eof during read
|
* file_body returns short_read on eof during read
|
||||||
|
@@ -51,12 +51,12 @@ class session : public std::enable_shared_from_this<session>
|
|||||||
http::response<http::string_body> res_;
|
http::response<http::string_body> res_;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Objects are constructed with a strand to
|
|
||||||
// ensure that handlers do not execute concurrently.
|
|
||||||
explicit
|
explicit
|
||||||
session(net::io_context& ioc, ssl::context& ctx)
|
session(
|
||||||
: resolver_(net::make_strand(ioc))
|
net::executor ex,
|
||||||
, stream_(net::make_strand(ioc), ctx)
|
ssl::context& ctx)
|
||||||
|
: resolver_(ex)
|
||||||
|
, stream_(ex, ctx)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -229,7 +229,12 @@ int main(int argc, char** argv)
|
|||||||
ctx.set_verify_mode(ssl::verify_peer);
|
ctx.set_verify_mode(ssl::verify_peer);
|
||||||
|
|
||||||
// Launch the asynchronous operation
|
// Launch the asynchronous operation
|
||||||
std::make_shared<session>(ioc, ctx)->run(host, port, target, version);
|
// The session is constructed with a strand to
|
||||||
|
// ensure that handlers do not execute concurrently.
|
||||||
|
std::make_shared<session>(
|
||||||
|
net::make_strand(ioc),
|
||||||
|
ctx
|
||||||
|
)->run(host, port, target, version);
|
||||||
|
|
||||||
// Run the I/O service. The call will return when
|
// Run the I/O service. The call will return when
|
||||||
// the get operation is complete.
|
// the get operation is complete.
|
||||||
|
Reference in New Issue
Block a user