Sha256: 47a4b9b49c6950bb7ea8286dfb7ee775cfe42c8a8024c3e91effb54ec512e25c
Contents?: true
Size: 644 Bytes
Versions: 2
Compression:
Stored size: 644 Bytes
Contents
<html> <head> <script src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js'></script> <script> $(document).ready(function(){ function debug(str){ $("#debug").append("<p>" + str); }; ws = new WebSocket("ws://localhost:8080/"); ws.onmessage = function(evt) { $("#msg").append("<p>"+evt.data+"</p>"); }; ws.onclose = function() { debug("socket closed"); }; ws.onopen = function() { debug("connected..."); ws.send("hello server"); }; }); </script> </head> <body> <div id="debug"></div> <div id="msg"></div> </body> </html>
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
em-websocket-0.0.2 | examples/test.html |
em-websocket-0.0.1 | examples/test.html |