Re: Is there any official documentation on shutdown procedure for ASIO SSL socket?

Richard Hodges via Boost-users <[email protected]>
Newsgroups gmane.comp.lib.boost.user
Message-ID <CALvx3hb2XeETSAcNZiyEzMvDapnP-3JXCD=VNfnABn_-AGjAAg@mail.gmail.com>
On Tue, 11 Oct 2022 at 01:51, Ivan Matek via Boost-users <
[email protected]> 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
> [email protected]
> https://lists.boost.org/mailman/listinfo.cgi/boost-users
>

_______________________________________________
Boost-users mailing list
[email protected]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.