You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Andrew de Andrade (JIRA)" <ji...@apache.org> on 2015/02/26 03:03:04 UTC
[jira] [Updated] (THRIFT-3010) nodejs: expose connection context to
handler
[ https://issues.apache.org/jira/browse/THRIFT-3010?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrew de Andrade updated THRIFT-3010:
--------------------------------------
Attachment: 0001-Expose-input-and-output-protocol-to-handlers.patch
Proof of Concept exposing the input/output protocols so that they can be accessed in the body of the handler functions
> nodejs: expose connection context to handler
> --------------------------------------------
>
> Key: THRIFT-3010
> URL: https://issues.apache.org/jira/browse/THRIFT-3010
> Project: Thrift
> Issue Type: Improvement
> Components: Node.js - Compiler
> Reporter: Andrew de Andrade
> Attachments: 0001-Expose-input-and-output-protocol-to-handlers.patch
>
>
> I want to expose the connection context to the handler functions. I've attached a patch for the JS compiler that accomplishes what I want, but I want to see if anyone else has an opinion on the correct interface.
> My current approach binds a plain javascript object, {{{ inputProtocol: input, outputProtocol: output }}}, to the this._handler.someHandlerFn` so that within the handler function you can use {{this.inputProtocol}" to get access to the inputProtocol, which can in turn be used to get access to the input transport.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)