I don't understand the main difference between WSASendTo
, WSASendMsg
, and TransmitPackets
for sending in-memory buffers:
They all allow buffer gathering
All of them allow overlapped (asynchronous) operation
WSASendTo
andTransmitPackets
both allow stream sockets (WSASendMsg
doesn't seem to)
Obviously there are some minor functionality difference (for example, only WSASendMsg
can send control information), but I'm not talking about those, since there is no choice to be made there.
For the most part, they all seem the same, and I imagine one of them is used by the rest.
What I'm wondering is, if I'm just sending data from an in-memory buffer to a stream or datagram socket, how do I choose which one to use?
Is any of them faster/better? Or, do they differ in any aspects such as (but not limited to):
Packet efficiency?
How big the buffers can be?
How big their queue sizes are?
Blocking vs. error behavior when the queue is full?
Cache behavior? (note that I'm not talking about sending files, just memory buffers)
Or anything else?