Lucas Rey has asked for the wisdom of the Perl Monks concerning the following question:
I don't report the whole code since it works perfect and could be too long. What I need to accomplish is send an ammount of packets every seconds. For example I would like to limit (throttle) to send 100 packets per second. What I need, is understand how (and if) I can implement this kind of mechanism, or simply an idea. The actual code looks like:1) Open a socket to a specific server 2) Reads data line by line from a big file using a while loop 3) Send data using the open socket
Thank you, Lucas.Open Socket Open file containing data to send while # Read file line by line { Send data to Server }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Limit Socket (throttle) to send specific ammount of packets every second
by kcott (Archbishop) on Sep 22, 2016 at 08:10 UTC | |
by Lucas Rey (Sexton) on Sep 23, 2016 at 10:18 UTC | |
|
Re: Limit Socket (throttle) to send specific ammount of packets every second
by Corion (Patriarch) on Sep 22, 2016 at 06:57 UTC | |
by Lucas Rey (Sexton) on Sep 22, 2016 at 07:21 UTC | |
by Discipulus (Canon) on Sep 22, 2016 at 07:26 UTC | |
by davido (Cardinal) on Sep 22, 2016 at 15:07 UTC | |
by Lucas Rey (Sexton) on Sep 23, 2016 at 13:32 UTC |