Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title></title>
- <script src="Scripts/jquery-1.9.1.js"></script>
- <script src="Scripts/jXSockets.2.3.js"></script>
- <script>
- var ws = null;
- $(function() {
- ws = new XSockets.WebSocket('ws://127.0.0.1:4502/Generic');
- ws.bind(XSockets.Events.connection.onclientconnect, function (client) {
- console.log('A client connected',client);
- });
- ws.bind(XSockets.Events.connection.onclientdisconnect, function (client) {
- console.log('A client disconnected', client);
- });
- ws.bind(XSockets.Events.open, function(client) {
- console.log('You are connected',client);
- });
- });
- </script>
- </head>
- <body>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement