I'm using sendto to send data on a raw socket. I have a series of packets that I send out, but it doesn't look like they are going out in the order that I called sendto in. For example if I do:
Code:
sendto(packet 1)
sendto(packet 2)
sendto(packet 3)
sendto(packet 4)
sendto(packet 5)
If I do a tcpdump on the outbound interface then run the program, the packets don't come out in the order packet 1, packet 2, packet 3, packet 4, packet 5. It'll be some other random order. Since it's a raw socket, I can't set TCP_NODELAY, since I never connect to anything.
Is this even nagle's algorithm causing this? Is there some way I can force the packets out in order?