proxygen
wangle::test::BytesReflector Class Reference

#include <CodecTestUtils.h>

Inheritance diagram for wangle::test::BytesReflector:
wangle::HandlerAdapter< R, W > wangle::Handler< R, R, W, W > wangle::HandlerBase< HandlerContext< R, W > >

Public Member Functions

folly::Future< folly::Unitwrite (Context *ctx, std::unique_ptr< folly::IOBuf > buf) override
 
- Public Member Functions inherited from wangle::HandlerAdapter< R, W >
void read (Context *ctx, R msg) override
 
folly::Future< folly::Unitwrite (Context *ctx, W msg) override
 
- Public Member Functions inherited from wangle::Handler< R, R, W, W >
 ~Handler () override=default
 
virtual void read (Context *ctx, Rmsg)=0
 
virtual void readEOF (Context *ctx)
 
virtual void readException (Context *ctx, folly::exception_wrapper e)
 
virtual void transportActive (Context *ctx)
 
virtual void transportInactive (Context *ctx)
 
virtual folly::Future< folly::Unitwrite (Context *ctx, Wmsg)=0
 
virtual folly::Future< folly::UnitwriteException (Context *ctx, folly::exception_wrapper e)
 
virtual folly::Future< folly::Unitclose (Context *ctx)
 
- Public Member Functions inherited from wangle::HandlerBase< HandlerContext< R, W > >
virtual ~HandlerBase ()=default
 
virtual void attachPipeline (HandlerContext< R, W > *)
 
virtual void detachPipeline (HandlerContext< R, W > *)
 
HandlerContext< R, W > * getContext ()
 

Additional Inherited Members

- Public Types inherited from wangle::HandlerAdapter< R, W >
typedef Handler< R, R, W, W >::Context Context
 
- Public Types inherited from wangle::Handler< R, R, W, W >
typedef R rin
 
typedef R rout
 
typedef W win
 
typedef W wout
 
typedef HandlerContext< R, W > Context
 
- Static Public Attributes inherited from wangle::Handler< R, R, W, W >
static const HandlerDir dir
 

Detailed Description

Definition at line 47 of file CodecTestUtils.h.

Member Function Documentation

folly::Future<folly::Unit> wangle::test::BytesReflector::write ( Context ctx,
std::unique_ptr< folly::IOBuf buf 
)
inlineoverride

Definition at line 49 of file CodecTestUtils.h.

References folly::IOBufQueue::append(), folly::IOBufQueue::cacheChainLength(), folly::makeFuture(), and folly::gen::move.

51  {
53  q_.append(std::move(buf));
54  ctx->fireRead(q_);
55 
56  return folly::makeFuture();
57  }
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
static Options cacheChainLength()
Definition: IOBufQueue.h:83
Future< typename std::decay< T >::type > makeFuture(T &&t)
Definition: Future-inl.h:1310

The documentation for this class was generated from the following file: