...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Set the timeout for subsequent logical operations.
void expires_after( net::steady_timer::duration expiry_time);
This sets either the read timer, the write timer, or both timers to expire
after the specified amount of time has elapsed. If a timer expires when
the corresponding asynchronous operation is outstanding, the stream will
be closed and any outstanding operations will complete with the error
beast::error::timeout
.
Otherwise, if the timer expires while no operations are outstanding, and
the expiraton is not set again, the next operation will time out immediately.
The timer applies collectively to any asynchronous reads or writes initiated
after the expiration is set, until the expiration is set again. A call
to async_connect
counts as both a
read and a write.
Name |
Description |
---|---|
|
The amount of time after which a logical operation should be considered timed out. |