On Tuesday, September 24, 2013 1:02:31 PM UTC+2, André Eife wrote:
>
> For example in the JSON file I can define (and mix) the type of each
> message seen from the client side: only allow listening on message, only
> allow emitting the message or a "get" type which is like RPC (emit and
> listen once for answer).
>
> And the other problems like listener management and missing wildcards seem
> to remain in dnode if I'm not mistaken.
>
>
dnode allows you to implement/use any callback-based RPC. For example:
function createRPC() {
var ee = new WildcardEventEmitter();
var self = {};
self.on = ee.on.bind(ee);
self.emit = ee.emit.bind(ee);
return self;
}
stream.pipe(dnode(createRPC())).pipe(stream);
client:
... connect and pipe dnode through shoe, then:
d.on('remote', function(remote) {
// this will call wildcardListener.on('wildcard.*, fn);
remote.on('wildcard.*', function listener(data) { ... });
});
--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.