]> git.sesse.net Git - jam/commitdiff
Add support for adjusting the number of receiver threads.
authorsgunderson@bigfoot.com <>
Tue, 13 Feb 2007 22:26:45 +0000 (23:26 +0100)
committersgunderson@bigfoot.com <>
Tue, 13 Feb 2007 22:26:45 +0000 (23:26 +0100)
jam.c

diff --git a/jam.c b/jam.c
index 3156ba82b2945934d2728b6eeb393e14a49bba82..d0c7923f1688a3f4c328889c9c9d0aac55c53063 100644 (file)
--- a/jam.c
+++ b/jam.c
@@ -42,6 +42,7 @@ const static struct option longopts[] = {
        { "destination-list", required_argument, NULL, 'd' },
        { "num-senders", required_argument, NULL, 'n' },
        { "num-sockets-per-sender", required_argument, NULL, 'N' },
+       { "num-receivers", required_argument, NULL, 'r' },
        { "port", required_argument, NULL, 'p' },
        { "sender-only", no_argument, NULL, 'o' },
        { NULL, 0, NULL, 0 }
@@ -119,7 +120,7 @@ void parse_options(int argc, char **argv)
        int option_index = 0;
 
        for ( ;; ) {
-               int c = getopt_long(argc, argv, "s:d:n:N:p:o", longopts, &option_index); 
+               int c = getopt_long(argc, argv, "s:d:n:N:r:p:o", longopts, &option_index); 
                switch (c) {
                case 's':
                        read_ip_list(optarg, &sources, &num_sources, &room_sources);
@@ -130,6 +131,9 @@ void parse_options(int argc, char **argv)
                case 'n':
                        num_senders = atoi(optarg);
                        break;
+               case 'r':
+                       num_receivers = atoi(optarg);
+                       break;
                case 'N':
                        num_sockets_per_sender = atoi(optarg);
                        break;