From: Dave Watson Date: Fri, 27 Feb 2015 18:14:46 +0000 (-0800) Subject: attempt at putting thrift2 on ChannelPipeline X-Git-Tag: v0.27.0~8 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0f3fabf1cf27e30ea892b37066f8f400025b319b;p=folly.git attempt at putting thrift2 on ChannelPipeline Summary: Basically a ripoff of Dave's D1483148 but with ChannelPipeline instead of rx. There's going to be a long tail of unit tests here, this is still pretty broken... Not convinced that this is the way to go but I wanted to get a feel for what it would be like to plug it into an IRL system. I think the simplicity/clarity of the handler implementations and to some extent the pipeline spec is an improvement over the rx way but I'm less sure about everything else. Test Plan: compiles and kind of works some of the time but not really Reviewed By: alandau@fb.com Subscribers: wormhole-diffs@, mcduff, hitesh, doug, yfeldblum, folly-diffs@, jsedgwick, subodh, andrewcox, njormrod, trunkagent, fugalh, alandau, bmatheny, mshneer FB internal diff: D1618704 Tasks: 5981284 Signature: t1:1618704:1424980854:83c6193b1156be2ec65cf79f9f2ad1af670da7f8 --- diff --git a/folly/wangle/channel/ChannelHandler.h b/folly/wangle/channel/ChannelHandler.h index da528426..e1aa6d5e 100644 --- a/folly/wangle/channel/ChannelHandler.h +++ b/folly/wangle/channel/ChannelHandler.h @@ -115,6 +115,10 @@ class ChannelHandlerPtr : public ChannelHandler< explicit ChannelHandlerPtr(HandlerPtr handler) : handler_(std::move(handler)) {} + HandlerPtr getHandler() { + return handler_; + } + void setHandler(HandlerPtr handler) { if (handler == handler_) { return; diff --git a/folly/wangle/channel/ChannelPipeline.h b/folly/wangle/channel/ChannelPipeline.h index a7458f21..02cfb603 100644 --- a/folly/wangle/channel/ChannelPipeline.h +++ b/folly/wangle/channel/ChannelPipeline.h @@ -186,8 +186,6 @@ class ChannelPipeline ~ChannelPipeline() {} - void destroy() override { } - void read(R msg) { typename ChannelPipeline::DestructorGuard dg( static_cast(this));