forked from kerryjiang/WebSocket4Net
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAutoJsBridge.html
More file actions
46 lines (45 loc) · 1.37 KB
/
Copy pathAutoJsBridge.html
File metadata and controls
46 lines (45 loc) · 1.37 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>WebSocket4Net.AutoJsBridge</title>
<style type="text/css">
html, body
{
height: 100%;
overflow: auto;
}
body
{
padding: 0;
margin: 0;
}
#silverlightControlHost
{
height: 100%;
text-align: center;
}
</style>
<script type="text/javascript" src="Silverlight.js"></script>
<script type="text/javascript" src="WebSocketEx.js"></script>
<script type="text/javascript">
var ws;
window.onload = function () {
var websocket = new WebSocketEx('ws://localhost:4502/websocket', function () {
ws = websocket;
alert("websocket is opened");
}, function () {
alert("websocket is closed");
}, function (evt) {
alert(evt.data);
}, function (evt) {
alert("error");
});
}
</script>
</head>
<body>
<form id="form1" runat="server" style="height: 100%">
<div id="silverlightControlHost" style="width: 0px; height: 0px;"></div>
</form>
</body>
</html>