0xbadf00d
0xbadf00d

Reputation: 18178

boost::asio when should I use socket::async_send instead of the free function async_write?

socket::async_send() is a composed method which is implemented in termos of zero or more calls to socket::async_write_some(). However, as the documentation describes:

The send operation may not transmit all of the data to the peer.

So, when do I need such a behavior?

Upvotes: 2

Views: 1042

Answers (1)

André Puel
André Puel

Reputation: 9179

When you are bursting info on the socket and part of the info is disposable.

Upvotes: 1

Related Questions