WSASend send order across multiple sockets

72 Views Asked by At

If I have one socket, and I do overlapped WSASends (from a single thread), then windows guarantees data will be sent in the order I call WSASend.

But if I have two sockets (connected to the same receiver), and I do overlapped WSASend's on them alternately (again from a single thread), does windows guarantee the order of sends is the order in which I call WSASend? If the answer is no, then would it help if I set the SO_SNDBUF socket option to zero on both sockets (so that calling WSASend would immediately put it on the wire)?

I also have the same question for WSARecv. If from a single thread I do overlapped WSARecv's on multiple sockets, will the completion routines be called in order?

0

There are 0 best solutions below