Github user djwatson commented on a diff in the pull request:

    https://github.com/apache/thrift/pull/357#discussion_r23307400
  
    --- Diff: lib/cpp/src/thrift/protocol/TProtocol.h ---
    @@ -659,6 +659,11 @@ class TProtocolFactory {
       virtual ~TProtocolFactory() {}
     
       virtual boost::shared_ptr<TProtocol> 
getProtocol(boost::shared_ptr<TTransport> trans) = 0;
    +  virtual boost::shared_ptr<TProtocol> 
getProtocol(boost::shared_ptr<TTransport> inTrans,
    --- End diff --
    
    THeader detects the client transport type - unframed, framed, header - and 
responds in kind.  To make this work, the input/output transport need to be the 
*same* THeader instance.  
    
    The transports don't necessarily need to be the same though (and in the 
case of TNonblocking, need to be different due to the way the MemoryBuffers 
work).  So THeader here takes in two transports, but uses a single protocol.
    
    Actually in the fbthrift code this wasn't added to the interface, but just 
special cased in TNonblockingServer with a dynamic_cast to TheaderProtocol, 
which we could do instead 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to