From 93b91ec2b78ceb827a015ccbf43ccda22e190655 Mon Sep 17 00:00:00 2001 From: Hiroyasu Nishiyama Date: Sun, 8 Jul 2018 22:11:39 +0900 Subject: [PATCH] Updated Design: Node Messaging API (markdown) --- Design:-Node-Messaging-API.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Design:-Node-Messaging-API.md b/Design:-Node-Messaging-API.md index 8a7ef47..6fac7ac 100644 --- a/Design:-Node-Messaging-API.md +++ b/Design:-Node-Messaging-API.md @@ -135,3 +135,12 @@ this.on('input', function(msg) { - this relies on the user passing msg through - something that could be a source of programming error. - it would need clear semantics over when it was called and how it relates to `node.error`. +### Proposal of `function` node extension for Node Messaging API (HN) + +In order to add support for the new style message handler, We propose following extension for `function` node. + +- add `send` and `done` variable that correspond to newly introduced arguments of new style message handler, +- add `node.setTimeout` function for specifying node timeout in milliseconds. + +For compatibility with the old style message handler, we expect old style handler is used for `function` node in default (no need for calling `done` callback function). +The new style handler can be activated by calling `node.useNewStyleHandler()` or selecting checkbox of setting panel of `function` node. \ No newline at end of file