Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var connection = new autobahn.Connection({
- url: 'ws://myhostname:8080',
- realm: 'tutorialpubsub'}
- );
- connection.onopen = function (session) {
- function onevent(args) {
- console.log(args);
- }
- session.subscribe('com.myapp.topic1', onevent).then(
- function(subscription) {
- console.log("subscription successfull", subscription);
- },
- function(error) {
- console.log("subscription failed", error);
- }
- );
- };
- connection.open();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement