diff --git a/wstest.html b/wstest.html
index 10fc8ff5..e0b6d015 100644
--- a/wstest.html
+++ b/wstest.html
@@ -6,6 +6,7 @@
Host:
Port:
+ Encrypt:
Send Delay (ms):
@@ -151,9 +152,17 @@
function init_ws() {
console.log(">> init_ws");
- var uri = "ws://" + host + ":" + port;
+ var scheme = "ws://";
+ if ($('encrypt').checked) {
+ scheme = "wss://";
+ }
+ var uri = scheme + host + ":" + port + "/?b64encode";
+ //if (RFB.use_seq) {
+ // uri += "&seq_num";
+ //}
console.log("connecting to " + uri);
ws = new WebSocket(uri);
+
ws.onmessage = function(e) {
//console.log(">> WebSockets.onmessage");
check_respond(e.data);
@@ -206,6 +215,7 @@
}
$clear(update_ref);
+ recv_cnt = 0;
update_stats(); // Final numbers
$('connectButton').value = "Start";
diff --git a/wstest.py b/wstest.py
index 8bb1541d..40d7813b 100755
--- a/wstest.py
+++ b/wstest.py
@@ -85,8 +85,7 @@ def generate():
data = "^%d:%d:%d:%s$" % (send_cnt, length, chksum, nums)
send_cnt += 1
- buf = "\x00" + b64encode(data) + "\xff"
- return buf
+ return encode(data)
def responder(client, delay=10):
global errors