error2("Failed creating socket for connection = %d\n",connection->index);
}
}
sleep(loop_interval);
}else{
for(i=0;i<num_connections;i++){
close_connection(&connections[i]);
stats.connections--;
...
...
@@ -128,6 +142,7 @@ main_program(int num_messages, int num_channels, int num_connections, const char
gotoexit;
}
}
}
exit:
...
...
@@ -209,6 +224,8 @@ main(int argc, char **argv)
structarg_int*channels=arg_int0("c","channels","<n>","define number of channels (default is 1)");
structarg_int*publishers=arg_int0("p","publishers","<n>","define number of publishers (default is 1)");
structarg_int*loop_interval=arg_int0("l","loop_interval","<n>","define the interval between loops in seconds. each loop send the specified number of messages (default is 0, not loop)");
structarg_str*server_name=arg_str0("S","server","<hostname>","server hostname where messages will be published (default is \"127.0.0.1\")");
structarg_int*server_port=arg_int0("P","port","<n>","server port where messages will be published (default is 9080)");
...
...
@@ -219,7 +236,7 @@ main(int argc, char **argv)
structarg_lit*version=arg_lit0(NULL,"version","print version information and exit");