|
Boost Users : |
Subject: Re: [Boost-users] Multiple async operations on a socket
From: Igor R (boost.lists_at_[hidden])
Date: 2009-09-16 15:39:05
> I have a boost::asio::ip::tcp::socket that I want to write to. Â Can I have multiple outstanding async_write() requests for a single socket?
asio::async_write() is a convenience function that calls
socket::async_write_some() multiple times - until all the data is
sent. This means that if you issue multiple asio::async_write's, the
data will be interleaved in most cases.
As for multiple async_write_some(), it will probably work on some
platforms... But note that async_write_some doesn't promise to send
all your data. So you can't "fire and forget" anyway.
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