Boost logo

Boost Users :

Subject: Re: [Boost-users] asio: selective cancellation of reads/writes
From: Alexander Fritze (alex_at_[hidden])
Date: 2010-01-14 01:14:24


On 13. Jan2010, at 3:00 , Maxim Yanchenko wrote:

> Alexander Fritze <alex <at> croczilla.com> writes:
>
>> In asio, if I have a socket with pending asynchronous reads and
>> writes, is there a way to selectively cancel only the reads or only
>> the writes? All I can find is basic_stream_socket::cancel() which
>> closes *all* pending operations on the socket.
>
>
> Is socket::shutdown() what you're looking for?
>
> http://www.boost.org/doc/html/boost_asio/reference/basic_socket/shutdown.html
>
> However, I'm not sure if it cancels all corresponding pending
> operations or just
> puts them on hold.
>

Hmm, interesting, shutdown() wasn't exactly what I was looking for,
but it does actually work for my particular situation.
Thanks!
Alex


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