#include "../lib/libwebsockets.h"
#include <poll.h>
+static unsigned int opts;
+
/*
* This demo shows how to connect multiple websockets simultaneously to a
* websocket server (there is no restriction on their having to be the same
(int)random() % 24);
libwebsocket_write(wsi,
- &buf[LWS_SEND_BUFFER_PRE_PADDING], l, LWS_WRITE_TEXT);
+ &buf[LWS_SEND_BUFFER_PRE_PADDING], l, opts | LWS_WRITE_TEXT);
/* get notified as soon as we can write again */
{ "help", no_argument, NULL, 'h' },
{ "port", required_argument, NULL, 'p' },
{ "ssl", no_argument, NULL, 's' },
+ { "killmask", no_argument, NULL, 'k' },
{ NULL, 0, 0, 0 }
};
optind++;
while (n >= 0) {
- n = getopt_long(argc, argv, "hsp:", options, NULL);
+ n = getopt_long(argc, argv, "khsp:", options, NULL);
if (n < 0)
continue;
switch (n) {
case 'p':
port = atoi(optarg);
break;
+ case 'k':
+ opts = LWS_WRITE_CLIENT_IGNORE_XOR_MASK;
+ break;
case 'h':
goto usage;
}