Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't connect when being used in react native #2

Open
isaacagaba opened this issue Apr 6, 2017 · 1 comment
Open

Doesn't connect when being used in react native #2

isaacagaba opened this issue Apr 6, 2017 · 1 comment

Comments

@isaacagaba
Copy link

isaacagaba commented Apr 6, 2017

I have followed the instructions, fortunately, the app doesn't crash however anything happens.Here is my code is written in react native.
`
import wamp from 'wamp.js';
var connection = new wamp.Connection({url: 'http://localhost:3009', realm: 'realm1'});
connection.onopen = function (session) {

      // 1) subscribe to a topic
      function onevent(args) {
          console.log("Event:", args[0]);
      }
      session.subscribe('onNewData', onevent);
  };

connection.open();
`

@webee
Copy link
Owner

webee commented Apr 6, 2017

@Akaiz I simplified the implementation, only support WebSocket, so your url must be a ws url. furthermore, you can watch your wamp server log to see what happened when open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants