Sha256: 6d6cdb111d5188f6999d818d10c575ea585af2d0c646f0b81daeba07b790b539
Contents?: true
Size: 1.42 KB
Versions: 2
Compression:
Stored size: 1.42 KB
Contents
<!DOCTYPE html> <html> <head> <meta charset="UTF-8" /> <meta content="text/css" http-equiv="content-style-type" /> <meta content="text/javascript" http-equiv="content-script-type" /> <script type="text/javascript" src='js/jquery.min.js'></script> <script type="text/javascript" src='js/swfobject.js'></script> <script type="text/javascript" src='js/FABridge.js'></script> <script type="text/javascript" src='js/web_socket.js'></script> <script type="text/javascript" src='js/json2.js'></script> <link rel="stylesheet" type="text/css" href="echo.css" /> <title>Rev-WebSocket Demo: Echo server</title> <script> WS_URL = "ws://localhost:8081"; WEB_SOCKET_SWF_LOCATION = "js/WebSocketMain.swf"; var global = this; $(document).ready(function(){ function debug(message) { html = "<p><span class='time'>"+new Date()+"</span>"+message+"</p>" $("#debug").append(html); } debug("connecting to "+WS_URL+"..."); ws = new WebSocket(WS_URL); ws.onopen = function() { debug("connected."); text = "client: hello"; ws.send(text); debug("message sent: "+text); } ws.onclose = function() { debug("disconnected..."); } ws.onerror = function(msg) { debug("failed to connect:"+msg); } ws.onmessage = function(event) { debug("message received: "+event.data); $("#message").append("<p>"+event.data+"</p>"); } }); </script> </head> <body> <div id="message"></div> <div id="debug"></div> </body>
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rev-websocket-0.1.3 | examples/public/echo.html |
rev-websocket-0.1.2 | examples/public/echo.html |