Kagome
Polkadot Runtime Engine in C++17
kagome::network::StreamEngine::ProtocolDescr Struct Reference
Collaboration diagram for kagome::network::StreamEngine::ProtocolDescr:

Public Member Functions

 ProtocolDescr (std::shared_ptr< ProtocolBase > proto)
 
 ProtocolDescr (std::shared_ptr< ProtocolBase > proto, std::shared_ptr< Stream > incoming_stream, std::shared_ptr< Stream > outgoing_stream)
 
bool hasActiveOutgoing () const
 
bool reserve ()
 
bool isOutgoingReserved () const
 
void dropReserved ()
 
bool hasActiveIncoming () const
 

Public Attributes

std::shared_ptr< ProtocolBaseprotocol
 
struct {
std::shared_ptr< Streamstream
 
incoming
 
struct {
std::shared_ptr< Streamstream
 
bool reserved = false
 
outgoing
 
std::deque< std::function< void(std::shared_ptr< Stream >)> > deferred_messages
 

Detailed Description

Definition at line 78 of file stream_engine.hpp.

Constructor & Destructor Documentation

kagome::network::StreamEngine::ProtocolDescr::ProtocolDescr ( std::shared_ptr< ProtocolBase proto)
inlineexplicit

Definition at line 94 of file stream_engine.hpp.

kagome::network::StreamEngine::ProtocolDescr::ProtocolDescr ( std::shared_ptr< ProtocolBase proto,
std::shared_ptr< Stream incoming_stream,
std::shared_ptr< Stream outgoing_stream 
)
inline

Definition at line 96 of file stream_engine.hpp.

Member Function Documentation

void kagome::network::StreamEngine::ProtocolDescr::dropReserved ( )
inline

Drops the flag that outgoing stream establishing.

Definition at line 130 of file stream_engine.hpp.

bool kagome::network::StreamEngine::ProtocolDescr::hasActiveIncoming ( ) const
inline

Returns if descriptor contains active incoming stream.

Definition at line 138 of file stream_engine.hpp.

bool kagome::network::StreamEngine::ProtocolDescr::hasActiveOutgoing ( ) const
inline

Returns if descriptor contains active outgoing stream.

Definition at line 106 of file stream_engine.hpp.

bool kagome::network::StreamEngine::ProtocolDescr::isOutgoingReserved ( ) const
inline

Definition at line 123 of file stream_engine.hpp.

bool kagome::network::StreamEngine::ProtocolDescr::reserve ( )
inline

Sets the flag that outgoing stream establishing. To prevent the situation of multiple streams to a single peer at the same time.

Definition at line 114 of file stream_engine.hpp.

Member Data Documentation

std::deque<std::function<void(std::shared_ptr<Stream>)> > kagome::network::StreamEngine::ProtocolDescr::deferred_messages

Definition at line 91 of file stream_engine.hpp.

struct { ... } kagome::network::StreamEngine::ProtocolDescr::incoming
struct { ... } kagome::network::StreamEngine::ProtocolDescr::outgoing
std::shared_ptr<ProtocolBase> kagome::network::StreamEngine::ProtocolDescr::protocol

Definition at line 79 of file stream_engine.hpp.


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