Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
N
noVNC
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rasky
noVNC
Commits
f8ee7b48
Commit
f8ee7b48
authored
May 06, 2010
by
Joel Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Encryption suppport for wstest.
parent
95ef30a1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
wstest.html
wstest.html
+11
-1
wstest.py
wstest.py
+1
-2
No files found.
wstest.html
View file @
f8ee7b48
...
...
@@ -6,6 +6,7 @@
Host:
<input
id=
'host'
style=
'width:100'
>
Port:
<input
id=
'port'
style=
'width:50'
>
Encrypt:
<input
id=
'encrypt'
type=
'checkbox'
>
Send Delay (ms):
<input
id=
'sendDelay'
style=
'width:50'
value=
"100"
>
<input
id=
'connectButton'
type=
'button'
value=
'Start'
style=
'width:100px'
onclick=
"connect();"
>
...
...
@@ -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
";
...
...
wstest.py
View file @
f8ee7b48
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment