| 1 |
<html> |
| 2 |
<head> |
| 3 |
<title>Jetty WebSocket Browser -> Server Debug Tool</title> |
| 4 |
<script type="text/javascript" src="websocket.js"></script> |
| 5 |
<link rel="stylesheet" type="text/css" href="main.css" media="all"> |
| 6 |
</head> |
| 7 |
<body> |
| 8 |
jetty websocket/browser/javascript -> server debug tool #console |
| 9 |
<div id="console"></div> |
| 10 |
<div id="buttons"> |
| 11 |
<input id="connect" class="button" type="submit" name="connect" value="connect"/> |
| 12 |
<input id="close" class="button" type="submit" name="close" value="close" disabled="disabled"/> |
| 13 |
<input id="info" class="button" type="submit" name="info" value="info" disabled="disabled"/> |
| 14 |
<input id="time" class="button" type="submit" name="time" value="time" disabled="disabled"/> |
| 15 |
<input id="many" class="button" type="submit" name="many" value="many" disabled="disabled"/> |
| 16 |
<input id="manythreads" class="button" type="submit" name="many" value="manythreads" disabled="disabled"/> |
| 17 |
<input id="hello" class="button" type="submit" name="hello" value="hello" disabled="disabled"/> |
| 18 |
<input id="there" class="button" type="submit" name="there" value="there" disabled="disabled"/> |
| 19 |
<input id="json" class="button" type="submit" name="json" value="json" disabled="disabled"/> |
| 20 |
</div> |
| 21 |
<script type="text/javascript"> |
| 22 |
$("connect").onclick = function (event) { |
| 23 |
wstool.connect(); |
| 24 |
return false; |
| 25 |
} |
| 26 |
$("close").onclick = function (event) { |
| 27 |
wstool.close(); |
| 28 |
return false; |
| 29 |
} |
| 30 |
$("info").onclick = function (event) { |
| 31 |
wstool.write("info:"); |
| 32 |
return false; |
| 33 |
} |
| 34 |
$("time").onclick = function (event) { |
| 35 |
wstool.write("time:"); |
| 36 |
return false; |
| 37 |
} |
| 38 |
$("many").onclick = function (event) { |
| 39 |
wstool.write("many:15,300"); |
| 40 |
return false; |
| 41 |
} |
| 42 |
$("manythreads").onclick = function (event) { |
| 43 |
wstool.write("manythreads:20,25,60"); |
| 44 |
return false; |
| 45 |
} |
| 46 |
$("hello").onclick = function (event) { |
| 47 |
wstool.write("Hello"); |
| 48 |
return false; |
| 49 |
} |
| 50 |
$("there").onclick = function (event) { |
| 51 |
wstool.write("There"); |
| 52 |
return false; |
| 53 |
} |
| 54 |
$("json").onclick = function (event) { |
| 55 |
wstool.write("[{\"channel\":\"/meta/subscribe\",\"subscription\":\"/chat/demo\",\"id\":\"2\",\"clientId\":\"81dwnxwbgs0h0bq8968b0a0gyl\",\"timestamp\":\"Thu," |
| 56 |
+ " 12 Sep 2013 19:42:30 GMT\"},{\"channel\":\"/meta/subscribe\",\"subscription\":\"/members/demo\",\"id\":\"3\",\"clientId\":\"81dwnxwbgs0h0bq8968b0a0gyl\",\"timestamp\":\"Thu," |
| 57 |
+ " 12 Sep 2013 19:42:30 GMT\"},{\"channel\":\"/chat/demo\",\"data\":{\"user\":\"ch\",\"membership\":\"join\",\"chat\":\"ch" |
| 58 |
+ " has joined\"},\"id\":\"4\",\"clientId\":\"81dwnxwbgs0h0bq8968b0a0gyl\",\"timestamp\":\"Thu," |
| 59 |
+ " 12 Sep 2013 19:42:30 GMT\"}]"); |
| 60 |
return false; |
| 61 |
} |
| 62 |
</script> |
| 63 |
</body> |
| 64 |
</html> |