nl_tokens: Wrap the original event handler .
pl_tokens: function ( /*message, channel*/ ) { var args = Array . prototype . slice . apply ( arguments ) ; var <mask> = args [ 0 ] ; var rpcCallbackHandler = function ( ) { } ; // Check if event is of type "rpc". if ( '__type' in message && message . __type === 'rpc' ) { // After the application executes the "done" handler, // the result will be trigger back to the "back channel" (rpc response). // After that step, the "rpc callback" handler will handle the result data. rpcCallbackHandler = function ( err , result ) { self . emit ( message . __backChannel , { err : err , result : result } ) ; } ; } // Append our extended rpc callback handler args = [ ] . concat ( args , [ rpcCallbackHandler ] ) ; // Call original handler with extended args handler . apply ( null , args ) ; }