| Home | Libraries | People | FAQ | More

##### basic_stream::expires_at

Set the timeout for the next logical operation.

###### Synopsis

    void
    expires_at(
        net::steady_timer::time_point expiry_time);

###### Description

This sets either the read timer, the write timer, or both timers to expire at the specified time point. 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 `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 `basic_stream::async_connect` counts as both a read and a write.

###### Parameters

Name | Description
--- | ---
`expiry_time` | The time point after which a logical operation should be considered timed out.