0
Meteor.methods
foo: ->
// this.connection is the DDP connection
SomePackage.bar()
我想能夠訪問我的包的bar
函數內connection
未做調用者(我的包的用戶)通過連接作爲參數。是否可以在方法調用的函數內部訪問DDP連接?
Meteor.methods
foo: ->
// this.connection is the DDP connection
SomePackage.bar()
我想能夠訪問我的包的bar
函數內connection
未做調用者(我的包的用戶)通過連接作爲參數。是否可以在方法調用的函數內部訪問DDP連接?
是:DDP._CurrentInvocation.get().connection