I have a client and server using `boost::asio` asynchronously. I want to add some timeouts to close the connection and potentially retry if something goes wrong.

My initial thought was that any time I call an `async_` function I should also start a `deadline_timer` to expire after I expect the async operation to complete. Now I'm wondering if that is strictly necessary in every case.

For example:

* `async_resolve` presumably uses the system's resolver which has timeouts built into it (e.g. `RES_TIMEOUT` in `resolv.h` possibly overridden by configuration in `/etc/resolv.conf`). By adding my own timer, I may conflict with how the user wants his resolver to work.
* For `async_connect`, the `connect(2)` syscall has some sort of timeout built into it
* etc.

So which (if any) `async_` calls are guaranteed to call their handlers within a "reasonable" time frame? And if an operation [can|does] timeout would the handler be passed the `basic_errors::timed_out` error or something else?