Closed arunoda closed 10 years ago
Wrap both "subscription" and "apply" (no need call)
On it
yes yes. Sorry.
Arunoda Susiripala
@arunoda http://twitter.com/arunoda http://gplus.to/arunodahttps://github.com/arunoda http://www.linkedin.com/in/arunoda
On Thu, Jul 10, 2014 at 10:53 AM, Muhammed Thanish <notifications@github.com
wrote:
"subscribe" right?
https://github.com/meteor/meteor/blob/devel/packages/livedata/livedata_connection.js#L459
— Reply to this email directly or view it on GitHub https://github.com/meteorhacks/meteor-zone/issues/3#issuecomment-48566484 .
I think we missed this line https://github.com/meteor/meteor/blob/devel/packages/livedata/livedata_connection.js#L27
Connection is not global. I'll see if Its exposed any other way.
There's one here https://github.com/meteor/meteor/blob/devel/packages/livedata/livedata_connection.js#L1524
but it says api.export('LivedataTest', {testOnly: true});
Don't use this. This is JS man. Very hard to hide stuff.
DDP.connect = function (url, options) {
var ret = new Connection(url, options);
allConnections.push(ret); // hack. see below.
return ret;
};
See. Do a fake DDP connect and disconnect immediately. Now you've a connection object. Then get the prototype :)
conn.constructor.prototype
Cool
I guess we can close this issue
yep.
Rather than hijacking the
Meteor.call
directly. Try to hijackConnection.prototype.call
.See: https://github.com/meteor/meteor/blob/devel/packages/livedata/livedata_connection.js#L617
Try that and see how it works.