pomelo-rpc icon indicating copy to clipboard operation
pomelo-rpc copied to clipboard

1.x can only notify. ignore client and server callback function.

Open whtiehack opened this issue 9 years ago • 0 comments


// remote service

module.exports = function(context) {
  return {
    echo: function(msg, cb) {
      cb(null, 'echo: ' + msg);
    },
    onlynotify:function(msg,cb){
    //cb is undefined.
      console.log('receive notify..:',cb,msg);
    }
  };
};
//client

 client.proxies.user.test.service.onlynotify(routeParam, msg[Math.round(Math.random()*(10-1))] + '::' + id++);
//no callback function

whtiehack avatar May 05 '16 15:05 whtiehack