PHP Classes

File: websocket/test/index.html

Recommend this page to a friend!
  Classes of Will Tinsdeall   Boiler Framework   websocket/test/index.html   Download  
File: websocket/test/index.html
Role: Auxiliary data
Content type: text/plain
Description: Documentation
Class: Boiler Framework
Web application framework that implements MVC
Author: By
Last change:
Date: 10 years ago
Size: 1,324 bytes
 

Contents

Class file image Download
<script src="http://autobahn.s3.amazonaws.com/js/autobahn.min.js"></script> <script> window.onload = function() { // WAMP server var wsuri = "ws://localhost:8080"; conn = ab.connect(wsuri, // WAMP session was established function (session) { console.log(session); session.subscribe("testChannel", function(topic, data) { console.log(topic); console.log(data); }); /* // asynchronous RPC, returns promise object session.call("http://example.com/simple/calc#add", 23, 7).then( // RPC success callback function (res) { console.log("got result: " + res); }, // RPC error callback function (error) { console.group("Error"); console.group("URI"); console.log(error.uri); console.groupEnd(); console.group("Description"); console.log(error.desc); console.groupEnd(); console.group("Detail"); console.log(error.detail); console.groupEnd(); console.groupEnd(); } ); */ }, // WAMP session is gone function (code, reason) { console.log(reason); } ); console.log(conn); }; </script>