To close a Tcp client, which one should be used,
socket.close()? What aspects should be considered when making such a choice?
As far as I know,
io_context is thread-safe whereas
socket is not.
So, I can invoke
io_context.stop() in any thread which may be different from the one that has called
socket.close(), I need to call
socket object is called in a different thread(e.g. the said thread calls
Source: Windows Questions C++