LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   *BSD (https://www.linuxquestions.org/questions/%2Absd-17/)
-   -   sendto doesn't send right away? (https://www.linuxquestions.org/questions/%2Absd-17/sendto-doesnt-send-right-away-824624/)

homer_3 08-06-2010 12:33 PM

sendto doesn't send right away?
 
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?

homer_3 08-07-2010 04:38 PM

It looks like it may be something else involving libpcap and evSelectFD.


All times are GMT -5. The time now is 06:31 AM.