Kagome
Polkadot Runtime Engine in C++17
libp2p::connection::StreamProxyBase Struct Reference

#include <stream_proxy_base.hpp>

Inheritance diagram for libp2p::connection::StreamProxyBase:
Collaboration diagram for libp2p::connection::StreamProxyBase:

Public Member Functions

 StreamProxyBase (std::shared_ptr< Stream > stream)
 
void read (gsl::span< uint8_t > out, size_t bytes, ReadCallbackFunc cb) override
 
void readSome (gsl::span< uint8_t > out, size_t bytes, ReadCallbackFunc cb) override
 
void deferReadCallback (outcome::result< size_t > res, ReadCallbackFunc cb) override
 
void write (gsl::span< const uint8_t > in, size_t bytes, WriteCallbackFunc cb) override
 
void writeSome (gsl::span< const uint8_t > in, size_t bytes, WriteCallbackFunc cb) override
 
void deferWriteCallback (std::error_code ec, WriteCallbackFunc cb) override
 
bool isClosedForRead () const override
 
bool isClosedForWrite () const override
 
bool isClosed () const override
 
void close (VoidResultHandlerFunc cb) override
 
void reset () override
 
void adjustWindowSize (uint32_t new_size, VoidResultHandlerFunc cb) override
 
outcome::result< bool > isInitiator () const override
 
outcome::result< peer::PeerId > remotePeerId () const override
 
outcome::result< multi::Multiaddress > localMultiaddr () const override
 
outcome::result< multi::Multiaddress > remoteMultiaddr () const override
 

Public Attributes

std::shared_ptr< Stream > stream
 

Detailed Description

Allows implementing only required subset of virtual methods. Implements all virtual methods and forwards them to stream.

Definition at line 16 of file stream_proxy_base.hpp.

Constructor & Destructor Documentation

libp2p::connection::StreamProxyBase::StreamProxyBase ( std::shared_ptr< Stream >  stream)
inlineexplicit

Definition at line 19 of file stream_proxy_base.hpp.

Member Function Documentation

void libp2p::connection::StreamProxyBase::adjustWindowSize ( uint32_t  new_size,
VoidResultHandlerFunc  cb 
)
inlineoverride

Definition at line 66 of file stream_proxy_base.hpp.

void libp2p::connection::StreamProxyBase::close ( VoidResultHandlerFunc  cb)
inlineoverride

Definition at line 60 of file stream_proxy_base.hpp.

void libp2p::connection::StreamProxyBase::deferReadCallback ( outcome::result< size_t >  res,
ReadCallbackFunc  cb 
)
inlineoverride

Definition at line 32 of file stream_proxy_base.hpp.

void libp2p::connection::StreamProxyBase::deferWriteCallback ( std::error_code  ec,
WriteCallbackFunc  cb 
)
inlineoverride

Definition at line 47 of file stream_proxy_base.hpp.

bool libp2p::connection::StreamProxyBase::isClosed ( ) const
inlineoverride

Definition at line 57 of file stream_proxy_base.hpp.

bool libp2p::connection::StreamProxyBase::isClosedForRead ( ) const
inlineoverride

Definition at line 51 of file stream_proxy_base.hpp.

bool libp2p::connection::StreamProxyBase::isClosedForWrite ( ) const
inlineoverride

Definition at line 54 of file stream_proxy_base.hpp.

outcome::result<bool> libp2p::connection::StreamProxyBase::isInitiator ( ) const
inlineoverride

Definition at line 70 of file stream_proxy_base.hpp.

outcome::result<multi::Multiaddress> libp2p::connection::StreamProxyBase::localMultiaddr ( ) const
inlineoverride

Definition at line 76 of file stream_proxy_base.hpp.

void libp2p::connection::StreamProxyBase::read ( gsl::span< uint8_t >  out,
size_t  bytes,
ReadCallbackFunc  cb 
)
inlineoverride

Definition at line 22 of file stream_proxy_base.hpp.

void libp2p::connection::StreamProxyBase::readSome ( gsl::span< uint8_t >  out,
size_t  bytes,
ReadCallbackFunc  cb 
)
inlineoverride

Definition at line 27 of file stream_proxy_base.hpp.

outcome::result<multi::Multiaddress> libp2p::connection::StreamProxyBase::remoteMultiaddr ( ) const
inlineoverride

Definition at line 79 of file stream_proxy_base.hpp.

outcome::result<peer::PeerId> libp2p::connection::StreamProxyBase::remotePeerId ( ) const
inlineoverride

Definition at line 73 of file stream_proxy_base.hpp.

void libp2p::connection::StreamProxyBase::reset ( )
inlineoverride

Definition at line 63 of file stream_proxy_base.hpp.

void libp2p::connection::StreamProxyBase::write ( gsl::span< const uint8_t >  in,
size_t  bytes,
WriteCallbackFunc  cb 
)
inlineoverride

Definition at line 37 of file stream_proxy_base.hpp.

void libp2p::connection::StreamProxyBase::writeSome ( gsl::span< const uint8_t >  in,
size_t  bytes,
WriteCallbackFunc  cb 
)
inlineoverride

Definition at line 42 of file stream_proxy_base.hpp.

Member Data Documentation

std::shared_ptr<Stream> libp2p::connection::StreamProxyBase::stream

Definition at line 17 of file stream_proxy_base.hpp.


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