proxygen
StringToByteEncoder Class Reference
Inheritance diagram for StringToByteEncoder:
wangle::MessageToByteEncoder< std::string > wangle::OutboundHandler< std::string, std::unique_ptr< folly::IOBuf > > wangle::HandlerBase< OutboundHandlerContext< std::unique_ptr< folly::IOBuf > > >

Public Member Functions

std::unique_ptr< folly::IOBufencode (std::string &msg) override
 
- Public Member Functions inherited from wangle::MessageToByteEncoder< std::string >
folly::Future< folly::Unitwrite (Context *ctx, std::stringmsg) override
 
- Public Member Functions inherited from wangle::OutboundHandler< std::string, std::unique_ptr< folly::IOBuf > >
 ~OutboundHandler () override=default
 
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< OutboundHandlerContext< std::unique_ptr< folly::IOBuf > > >
virtual ~HandlerBase ()=default
 
virtual void attachPipeline (OutboundHandlerContext< std::unique_ptr< folly::IOBuf > > *)
 
virtual void detachPipeline (OutboundHandlerContext< std::unique_ptr< folly::IOBuf > > *)
 
OutboundHandlerContext< std::unique_ptr< folly::IOBuf > > * getContext ()
 

Additional Inherited Members

- Public Types inherited from wangle::MessageToByteEncoder< std::string >
typedef OutboundHandler< std::string, std::unique_ptr< folly::IOBuf > >::Context Context
 
- Public Types inherited from wangle::OutboundHandler< std::string, std::unique_ptr< folly::IOBuf > >
typedef folly::Unit rin
 
typedef folly::Unit rout
 
typedef std::string win
 
typedef std::unique_ptr< folly::IOBufwout
 
typedef OutboundHandlerContext< std::unique_ptr< folly::IOBuf > > Context
 
- Static Public Attributes inherited from wangle::OutboundHandler< std::string, std::unique_ptr< folly::IOBuf > >
static const HandlerDir dir
 

Detailed Description

A simple encoder that encodes strings of messages to IOBuf. This is used in the ObservingPipeline to encode the messages broadcasted by the upstream to IOBuf so that it can be written to the client socket.

Definition at line 89 of file BroadcastProxy.cpp.

Member Function Documentation

std::unique_ptr<folly::IOBuf> StringToByteEncoder::encode ( std::string msg)
inlineoverridevirtual

Implements wangle::MessageToByteEncoder< std::string >.

Definition at line 91 of file BroadcastProxy.cpp.

References folly::IOBuf::copyBuffer().

91  {
92  return IOBuf::copyBuffer(msg);
93  }
std::unique_ptr< IOBuf > copyBuffer(const folly::IOBuf &buf)

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