Boost logo

Boost Users :

From: Richard Hodges (hodges.r_at_[hidden])
Date: 2022-10-11 08:21:36


On Tue, 11 Oct 2022 at 01:51, Ivan Matek via Boost-users <
boost-users_at_[hidden]> wrote:

> There is this SO answer
> https://stackoverflow.com/a/25703699/
> with Vinnie comment from 8y ago that it should be added to documentation.
> :)
> I can not find anything in the documentation so I presume the
> documentation/example does not exist, but I decided to double check.
>

There are three methods on the asio socket interface that will be relevant:

- The destructor, which calls close() internally
- the close() method, which calls shutdown() internally - you can think of
this as a passthrough to an underlying posix close() function call but with
an extra important step.
- the shutdown() method which you can think of as a passthrough to the
underlying bsd sockets shutdown() function.

Calling close() will cause all outstanding IO operations to immediately
post completion with an error code

Therefore any of the above will cause all outstanding IO on the socket to
post their completion handlers to the associated executor.

>
> regards,
> Ivan
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> https://lists.boost.org/mailman/listinfo.cgi/boost-users
>



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net