aboutsummaryrefslogtreecommitdiff
path: root/tests/websockets_bigdata.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-10-16 11:21:40 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-10-17 12:44:21 -0700
commit87830ba9c03cd445583e148183a38e1345a4a0bd (patch)
tree0125834f37eb0939ad7dc69e308121916540afd5 /tests/websockets_bigdata.h
parent5e2d3c4595aa28199a9f60c7cbd8cc699abbd32e (diff)
add non-working websockets test for large amounts of 'random' data
Diffstat (limited to 'tests/websockets_bigdata.h')
-rw-r--r--tests/websockets_bigdata.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/websockets_bigdata.h b/tests/websockets_bigdata.h
new file mode 100644
index 00000000..fa1a6b17
--- /dev/null
+++ b/tests/websockets_bigdata.h
@@ -0,0 +1,20 @@
+
+#include <stdlib.h>
+
+#define DATA_SIZE 1250
+// 1500 fails
+
+char *generateData() {
+ char *ret = malloc(65536*2);
+ char *curr = ret;
+ for (int i = 0; i < 256; i++) {
+ for (int j = 0; j < 256; j++) {
+ *curr = i;
+ curr++;
+ *curr = j;
+ curr++;
+ }
+ }
+ return ret;
+}
+