Sequential WSASend() calls - can I rely on TCP to put them on the wire in the posting order?

Posted by Poni on Stack Overflow See other posts from Stack Overflow or by Poni
Published on 2010-06-14T23:26:06Z Indexed on 2010/06/14 23:32 UTC
Read the original article Hit count: 131

Filed under:
|
|

On Windows I/O completion ports, say I do this:

void function()
{
    WSASend("1111"); // A
    WSASend("2222"); // B
    WSASend("3333"); // C
}

If I got a "write-complete" that says 3 bytes of WSASend() A were sent, is it possible that right after that I'll get a "write-complete" that tells me that some or all of B & C were sent, or will TCP will hold them until I re-issue a WSASend() call with the rest of A's data? Or will TCP complete it automatically?

© Stack Overflow or respective owner

Related posts about tcp

Related posts about network-programming