As a callback
majimboo opened this issue · 1 comments
majimboo commented
I'm trying to do something like:
Network.hookPacket(0x0000, onKeepAlive);
function onKeepAlive(...
Now I wanted to use zerorpc like:
Network.hookPacket(0x0000, Login.invoke('onKeepAlive'));
But I guess it gets executed instead of being a callback. So how do you think this could work with zerorpc?
bombela commented
You probably want to use a closure: Network.hookPacket(0x0000, function() { Login.invoke('onKeepAlive') });
But don't trust me on this, and go lookup on stackoverflow, my experience of nodejs is limited.