Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    minimum time intervals between sent packets

    I'm writing a tcp and udp program which sends a lot of packets successively. for example, each packets(including ip/tcp/udp header) is about 60 bytes, in a program, e.g., udp_sender, it sends 5 packets each time, like:

         send(sockfd, data, data_len);
    now I have a shell script

    for i in `seq 1 20000`;do
       sleep interval
    I tried several values for interval, for example 50 milliseconds
    so there are 100 packets per second
    and the number of bytes is around 7KB/sec
    it is not a bit value
    but the receiver can only receive a small part of the packets
    Last edited by atreyu; 04-30-2013 at 05:06 AM. Reason: added CODE tags

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    This is UDP? UDP has no guarantees of delivery or sequence of packets sent vs. packets received. TCP takes care of that for you, but UDP does not. You have to code the protocols to deal with out-of-order or missing packets yourself.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts