Boost logo

Boost Users :

From: Igor R (boost.lists_at_[hidden])
Date: 2008-07-01 11:05:56


You can use tcp::socket::cancel(), but note that on most Windows
platforms it won't work.
http://www.boost.org/doc/libs/1_35_0/doc/html/boost_asio/reference/basic_stream_socket/cancel/overload2.html

On the other hand, you can just close() your socket - this cancels any
outstanding operations on it.

2008/7/1, Ryan McConnehey <mccorywork_at_[hidden]>:
> All,
>
> Async_receive_from waits on data from a socket. I have this socket in
> another thread with the sole function of listening to the socket, putting
> it's data into a queue and then going back to listening on the socket. Is
> there a way to end the function early, while it's still waiting for data, so
> I can destroy the socket?
>
> Ryan
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://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