1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

minimal-ss-client-tx: add -c flag for count of rx to get

This commit is contained in:
Andy Green 2021-02-25 21:20:36 +00:00
parent a79342014d
commit 8d6f59d74f

View file

@ -23,7 +23,7 @@
#define PKT_SIZE 80
#define RATE_US 50000
static int interrupted, bad = 1;
static int interrupted, bad = 1, reads = 100;
typedef struct myss {
struct lws_ss_handle *ss;
@ -54,7 +54,7 @@ txcb(struct lws_sorted_usec_list *sul)
* this as a pass / fail test.
*/
if (m->count == 100) {
if (m->count == reads) {
interrupted = 1;
bad = 0;
} else {
@ -150,6 +150,9 @@ int main(int argc, const char **argv)
if ((p = lws_cmdline_option(argc, argv, "-d")))
logs = atoi(p);
if ((p = lws_cmdline_option(argc, argv, "-c")))
reads = atoi(p);
lws_set_log_level(logs, NULL);
lwsl_user("LWS secure streams client TX [-d<verb>]\n");