-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebapp.html
More file actions
32 lines (30 loc) · 761 Bytes
/
webapp.html
File metadata and controls
32 lines (30 loc) · 761 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<!DOCTYPE HTML>
<html>
<head>
<script type="text/javascript">
var remote = "ws://ec2-50-19-32-33.compute-1.amazonaws.com:8080/";
var local = "ws://169.254.134.89:6354/";
var websocketLocal = new WebSocket(local);
var websocketRemote = new WebSocket(remote);
websocketLocal.onopen = function(){}
websocketLocal.onmessage = function(evt)
{
var recv_msg = evt.data;
websocketRemote.send(recv_msg);
}
websocketLocal.onclose = function(){}
websocketLocal.binaryType = "arraybuffer";
websocketRemote.onopen = function(){}
websocketRemote.onmessage = function(evt)
{
var recv_msg = evt.data;
websocketLocal.send(recv_msg);
}
websocketRemote.onclose = function(){}
websocketRemote.binaryType = "arraybuffer";
</script>
</head>
<body>
Hello, world!
</body>
</html>