Skip to content

Commit ea7aebb

Browse files
committed
ui test
1 parent 60434e6 commit ea7aebb

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

test/ui.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title></title>
5+
<script src="ui.js"></script>
6+
</head>
7+
<body>
8+
RUNNING
9+
</body>
10+
</html>

test/ui.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
function start1(argument) {
2+
// body...
3+
ws1 = new WebSocket("ws://localhost:8000")
4+
5+
var t1 = {"info_hash":"dddddddddddddddddddd",
6+
"action": "announce",
7+
"left" : 1000,
8+
"uploaded": 0,
9+
"downloaded": 500,
10+
"peer_id": "eeeeeeeeeeeeeeeeeeee"
11+
}
12+
13+
var t2 = {"info_hash":"ddddddddddddddddddde",
14+
"action": "announce",
15+
"left" : 1000,
16+
"uploaded": 0,
17+
"downloaded": 500,
18+
"peer_id": "eeeeeeeeeeeeeeeeeeee"
19+
}
20+
21+
var t3 = {"info_hash":"dddddddddddddddddddf",
22+
"action": "announce",
23+
"left" : 1000,
24+
"uploaded": 0,
25+
"downloaded": 500,
26+
"peer_id": "eeeeeeeeeeeeeeeeeeee"
27+
}
28+
29+
setInterval( ()=>{ws1.send(JSON.stringify(t1))},5000)
30+
setInterval( ()=>{ws1.send(JSON.stringify(t2))},5000)
31+
setInterval( ()=>{ws1.send(JSON.stringify(t3))},5000)
32+
console.log("started peer1")
33+
}

0 commit comments

Comments
 (0)