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
0385e011
Commit
0385e011
authored
Apr 07, 2010
by
Joel Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove old test files.
parent
cc0410a3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
143 deletions
+0
-143
echo_local.html
echo_local.html
+0
-61
interact.html
interact.html
+0
-82
No files found.
echo_local.html
deleted
100644 → 0
View file @
cc0410a3
<!DOCTYPE html>
<html
xmlns=
"http://www.w3.org/1999/xhtml"
>
<head>
<title>
Web Sockets echo test
</title>
<meta
charset=
"UTF-8"
>
<script
src=
"include/mootools.js"
></script>
<script
src=
"include/mootools-more.js"
></script>
<script>
var
cnt
=
0
;
var
s
=
null
;
var
timer
=
null
;
function
debug
(
str
)
{
cell
=
$
(
'debug'
);
cell
.
innerHTML
+=
str
+
"<br/>"
;
}
function
send_data
()
{
debug
(
">> send_data: testing "
+
cnt
);
s
.
send
(
"testing "
+
cnt
);
cnt
++
;
}
window
.
onload
=
function
()
{
debug
(
">> window.onload"
);
var
uri
=
new
URI
(
window
.
location
);
var
host
=
uri
.
getData
(
"host"
);
var
port
=
uri
.
getData
(
"port"
);
if
((
!
host
)
||
(
!
port
))
{
debug
(
"must set host and port"
);
return
;
}
var
location
=
"ws://"
+
host
+
":"
+
port
debug
(
"connecting to "
+
location
);
s
=
new
WebSocket
(
location
);
s
.
onmessage
=
function
(
e
)
{
debug
(
">> onmessage: "
+
e
.
data
);
};
s
.
onopen
=
function
(
e
)
{
debug
(
">> onopen"
+
e
);
timer
=
send_data
.
periodical
(
1000
);
};
s
.
onclose
=
function
(
e
)
{
debug
(
">> onclose: "
+
e
);
if
(
timer
)
{
timer
=
$clear
(
timer
);
}
debug
(
"<< onclose: "
+
e
);
}
debug
(
"<< window.onload"
);
};
</script>
</head>
<body>
Debug:
<div
id=
"debug"
style=
"width:600px;height:300px"
></div>
</body>
</html>
interact.html
deleted
100644 → 0
View file @
cc0410a3
<!DOCTYPE html>
<html
xmlns=
"http://www.w3.org/1999/xhtml"
>
<head>
<title>
Web Sockets echo test
</title>
<meta
charset=
"UTF-8"
>
<script
src=
"include/mootools.js"
></script>
<script
src=
"include/mootools-more.js"
></script>
<script>
var
cnt
=
0
;
var
s
=
null
;
var
timer
=
null
;
function
debug
(
str
)
{
cell
=
$
(
'debug'
);
cell
.
innerHTML
+=
str
+
"<br/>"
;
}
function
send_data
()
{
var
entry
=
$
(
'entry'
);
debug
(
">> send: "
+
entry
.
value
);
s
.
send
(
entry
.
value
+
"
\n
"
);
entry
.
value
=
""
;
// Clear it
return
true
;
}
window
.
onload
=
function
()
{
debug
(
">> window.onload"
);
var
uri
=
new
URI
(
window
.
location
);
var
host
=
uri
.
getData
(
"host"
);
var
port
=
uri
.
getData
(
"port"
);
if
((
!
host
)
||
(
!
port
))
{
debug
(
"must set host and port"
);
return
;
}
var
location
=
"ws://"
+
host
+
":"
+
port
debug
(
"connecting to "
+
location
);
s
=
new
WebSocket
(
location
);
s
.
onmessage
=
function
(
e
)
{
debug
(
">> onmessage"
);
var
out
=
$
(
"out"
);
out
.
innerHTML
=
out
.
innerHTML
+
e
.
data
;
};
s
.
onopen
=
function
(
e
)
{
debug
(
">> onopen"
);
};
s
.
onclose
=
function
(
e
)
{
debug
(
">> onclose"
);
if
(
timer
)
{
timer
=
$clear
(
timer
);
}
debug
(
"<< onclose"
);
}
debug
(
"<< window.onload"
);
};
</script>
</head>
<body>
<h1>
Web Sockets Interactive
</h1>
<fieldset>
<h3>
Server output:
</h3>
<pre>
<div
id=
"out"
></div>
</pre>
</fieldset>
<p>
Enter something in the entry below to send to the server.
</p>
<fieldset>
<p>
Enter:
<input
id=
"entry"
onkeypress=
"{if (event.keyCode==13) send_data()}"
size=
"42"
></p>
<!-- <p>Enter: <input id="entry" onchange="send_data()" onkeypress="{if (event.keyCode==13) send_data()}" size="42"></p> -->
</fieldset>
<br><br>
Debug:
<div
id=
"debug"
style=
"width:600px;height:300px"
></div>
</body>
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