diff options
| author | Frediano Ziglio <fziglio@redhat.com> | 2016-01-11 10:48:27 +0000 |
|---|---|---|
| committer | Frediano Ziglio <fziglio@redhat.com> | 2016-01-11 11:03:11 +0000 |
| commit | 1d365c57892de87b369f6807131184209875986b (patch) | |
| tree | b66ab1f83d6c76ecd7bd3f2d5844c891ac4ff47d /latency.c | |
| parent | 96b7f11c2bba67ade9a432d92e6bc7ec59b5036e (diff) | |
implement latency and rate limits
there is a problem that code does not detect exactly if next data are
arriving while we are sending (limiting data)
Diffstat (limited to 'latency.c')
| -rw-r--r-- | latency.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -124,6 +124,7 @@ main(int argc, char **argv) setup_signals(); + unsigned connection_id = 0; while (!term) { int fd = accept(sock, NULL, NULL); if (fd == -1) { @@ -145,7 +146,7 @@ main(int argc, char **argv) close(sock); signal(SIGTERM, SIG_DFL); signal(SIGINT, SIG_DFL); - handle_client(fd); + handle_client(fd, ++connection_id); exit(EXIT_SUCCESS); break; default: |
