mirror of https://github.com/jumpserver/jumpserver
guanghongwei
10 years ago
5 changed files with 15 additions and 49 deletions
@ -0,0 +1,14 @@
|
||||
pexpect==3.3 |
||||
django-socketio==0.3.9 |
||||
gevent-socketio==0.2.1 |
||||
sphinx-me==0.3 |
||||
django==1.7.1 |
||||
gevent-websocket==0.9.3 |
||||
gevent==1.0.1 |
||||
greenlet==0.4.5 |
||||
python-ldap==2.4.18 |
||||
paramiko==1.15.1 |
||||
pycrypto==2.6.1 |
||||
ecdsa>=0.11 |
||||
MySQL-python==1.2.5 |
||||
python-ldap==2.4.18 |
@ -1,28 +0,0 @@
|
||||
<!DOCTYPE html> |
||||
<meta charset="utf-8" /> |
||||
<title>WebSocket Test</title> |
||||
<script language="javascript" type="text/javascript"> |
||||
var wsUri = "ws://echo.websocket.org/"; |
||||
var output; |
||||
function init() { |
||||
output = document.getElementById("output"); testWebSocket(); |
||||
} |
||||
function testWebSocket() { |
||||
var websocket = new WebSocket(wsUri); |
||||
websocket.onopen = function(evt) { onOpen(evt) }; |
||||
websocket.onclose = function(evt) { onClose(evt) }; |
||||
websocket.onmessage = function(evt) { onMessage(evt) }; |
||||
websocket.onerror = function(evt) { onError(evt) }; } |
||||
function onOpen(evt) { writeToScreen("CONNECTED"); doSend("WebSocket rocks"); } |
||||
function onClose(evt) { writeToScreen("DISCONNECTED"); } |
||||
function onMessage(evt) { writeToScreen('<span style="color: blue;">RESPONSE: ' + evt.data+'</span>'); websocket.close(); } |
||||
function onError(evt) { writeToScreen('<span style="color: red;">ERROR:</span> ' + evt.data); } |
||||
function doSend(message) { writeToScreen("SENT: " + message); websocket.send(message); } |
||||
function writeToScreen(message) { |
||||
var pre = document.createElement("p"); |
||||
pre.style.wordWrap = "break-word"; |
||||
pre.innerHTML = message; output.appendChild(pre); } |
||||
window.addEventListener("load", init, false); |
||||
</script> |
||||
<h2>WebSocket Test</h2> |
||||
<div id="output"></div> |
Loading…
Reference in new issue