Revision 0a40460a dumbstreamer.c

View differences:

dumbstreamer.c
21 21
static const char *srv_ip = "";
22 22
static int period = 500;
23 23
static int chunks_per_second = 4;
24
static int buff_size = 8;
24 25

  
25 26
static void cmdline_parse(int argc, char *argv[])
26 27
{
27 28
  int o;
28 29

  
29
  while ((o = getopt(argc, argv, "p:i:P:I:")) != -1) {
30
  while ((o = getopt(argc, argv, "b:c:t:p:i:P:I:")) != -1) {
30 31
    switch(o) {
32
      case 'b':
33
        buff_size = atoi(optarg);
34
        break;
35
      case 'c':
36
        chunks_per_second = atoi(optarg);
37
        break;
38
      case 't':
39
        period = atoi(optarg);
40
        break;
31 41
      case 'p':
32 42
        srv_port = atoi(optarg);
33 43
        break;
......
84 94
    }
85 95
    topAddNeighbour(srv);
86 96

  
87
    loop(my_sock, 1000000 / chunks_per_second);
97
    loop(my_sock, 1000000 / chunks_per_second, buff_size);
88 98
  }
89 99

  
90 100
  source_loop(my_sock, period * 1000, chunks_per_second * period / 1000);

Also available in: Unified diff