<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr">On Fri, 6 Apr 2018, 19:50 Franz Fehringer via Boost-users, <<a href="mailto:boost-users@lists.boost.org">boost-users@lists.boost.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <div text="#000000" bgcolor="#FFFFFF"> It's Boris Karloff but Chris(topher) Kohlhoff :-)<br></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Ah yes, important difference. :) </div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF"> <br> <br> <div class="m_6558752578128498274moz-cite-prefix">Am 06.04.2018 um 16:37 schrieb Richard Hodges via Boost-users:<br> </div> <blockquote type="cite"> <div dir="ltr"><br> <div class="gmail_extra"><br> <div class="gmail_quote">On 6 April 2018 at 16:29, Alexander D. via Boost-users <span dir="ltr"><<a href="mailto:boost-users@lists.boost.org" target="_blank" rel="noreferrer">boost-users@lists.boost.org</a>></span> wrote:<br> <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="m_6558752578128498274gmail-">On April 6, 2018 9:55 PM, Vinnie Falco via Boost-users <<a href="mailto:boost-users@lists.boost.org" target="_blank" rel="noreferrer">boost-users@lists.boost.org</a>> wrote:<br> > On Fri, Apr 6, 2018 at 6:11 AM, Alexander D. via Boost-users<br> > <<a href="mailto:boost-users@lists.boost.org" target="_blank" rel="noreferrer">boost-users@lists.boost.org</a>> wrote:<br> >>>> The only solution I can think of would be to cancel the read operation, but there's no portable way in asio to do this.<br> >>><br> >>> sock.next_layer().cancel();<br> >>><br> >>> ?<br> >><br> >> Per ASIO Reference:<br> >><br> >> "Calls to cancel() will always fail with boost::asio::error::operation_not_supported when run on Windows XP, Windows Server 2003, and earlier versions of Windows, unless BOOST_ASIO_ENABLE_CANCELIO is defined. However, the CancelIo function has two issues that should be considered before enabling its use:<br> >> ..."<br> >><br> >> which renders cancel() non-portable.<br> ><br> > I consider the issues with cancel present in Windows XP and Windows<br> > Server 2003 to be sufficiently problematic that it is not worth taking<br> > them into account when designing robust network applications (I do<br> > develop mostly on Windows). Unless you have a specific business need<br> > to support those defective operating systems, I would just ignore<br> > them.<br> <br> </span>Yes, I do need the program to work on at least Windows XP.<br> <br> However, even if cancel() is used, it is a workaround, not a solution. If you run the code I supplied, you'll notice that async_read_some() is actually finished with a "stream truncated" error, quite similar to "canceling" the read. The problem is on async_shutdown()'s handler not being called, and it's not mentioned anywhere in the reference. Why can't we shutdown a stream while reading from it (since we can close a socket while reading)?<br> </blockquote> <div><br> </div> <div>In the past, when I have had queries about the inner workings and design decisions behind ASIO, I have emailed the author, Chris Karloff. I am sure he is a busy guy but he has taken the trouble to answer helpfully in the past. It may be worth dropping him a line and asking for a suggestion.<br> <br> He didn't charge me but having received help twice now, I think it would be rude of me not to offer him a few hours consultancy if I needed his help again. </div> <div><br> <a href="https://think-async.com/Asio/CommercialSupport" target="_blank" rel="noreferrer">https://think-async.com/Asio/CommercialSupport</a><br> </div> <div><br> </div> <div><br> </div> <div><br> </div> <div> </div> <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <div class="m_6558752578128498274gmail-HOEnZb"> <div class="m_6558752578128498274gmail-h5">_______________________________________________<br> Boost-users mailing list<br> <a href="mailto:Boost-users@lists.boost.org" target="_blank" rel="noreferrer">Boost-users@lists.boost.org</a><br> <a href="https://lists.boost.org/mailman/listinfo.cgi/boost-users" rel="noreferrer noreferrer" target="_blank">https://lists.boost.org/mailman/listinfo.cgi/boost-users</a><br> </div> </div> </blockquote> </div> <br> </div> </div> <br> <fieldset class="m_6558752578128498274mimeAttachmentHeader"></fieldset> <br> <pre>_______________________________________________ Boost-users mailing list <a class="m_6558752578128498274moz-txt-link-abbreviated" href="mailto:Boost-users@lists.boost.org" target="_blank" rel="noreferrer">Boost-users@lists.boost.org</a> <a class="m_6558752578128498274moz-txt-link-freetext" href="https://lists.boost.org/mailman/listinfo.cgi/boost-users" target="_blank" rel="noreferrer">https://lists.boost.org/mailman/listinfo.cgi/boost-users</a> </pre> </blockquote> <br> </div> _______________________________________________<br> Boost-users mailing list<br> <a href="mailto:Boost-users@lists.boost.org" target="_blank" rel="noreferrer">Boost-users@lists.boost.org</a><br> <a href="https://lists.boost.org/mailman/listinfo.cgi/boost-users" rel="noreferrer noreferrer" target="_blank">https://lists.boost.org/mailman/listinfo.cgi/boost-users</a><br> </blockquote></div></div></div>