suyog
1
Hello,
Has anyone used Meteor DDP client in Ionic application ?
I want to use meteor DDP socket for sending sever messages in ionic application or call server side methods? how can that is possible?
I have tried using streamy meteor package but it doesn’t work with ionic.
Please help me if anyone has better solution
suyog
2
I have fixed this using DDP feature of sending arbitrary messages to client on same socket, below is sudo code:
For instance calling “write” from the server:
Meteor.server.sessions[ session_id ].socket.write( { data_for_user: “something” } )
you can catch DDP messages on client like this.
var original = Meteor.connection._livedata_data;
Meteor.connection._livedata_data = function (msg) {
** console.log(msg)**
** return original.call(this, msg);**
}
1 Like
Have a look at meteor-client-side, which give you full function meteor client side with Meteor.call or Meteor.userId()
2 Likes