TARAXA
dev::p2p::RLPXPacket Class Reference

#include <RLPXPacket.h>

Public Member Functions

 RLPXPacket (uint8_t _capId, RLPStream &_type, RLPStream &_data)
 Construct packet. RLPStream data is invalidated. More...
 
 RLPXPacket (uint8_t _capId, bytesConstRef _in)
 Construct packet from single bytestream. RLPStream data is invalidated. More...
 
 RLPXPacket (RLPXPacket const &_p)=delete
 
 RLPXPacket (RLPXPacket &&_p)
 
bytes const & type () const
 
bytes const & data () const
 
uint8_t cap () const
 
size_t size () const
 
bool append (bytesConstRef _in)
 Appends byte data and returns if packet is valid. More...
 
virtual bool isValid () const noexcept
 

Protected Attributes

uint8_t m_cap
 
bytes m_type
 
bytes m_data
 

Detailed Description

RLPX Packet

Constructor & Destructor Documentation

◆ RLPXPacket() [1/4]

dev::p2p::RLPXPacket::RLPXPacket ( uint8_t  _capId,
RLPStream _type,
RLPStream _data 
)
inline

Construct packet. RLPStream data is invalidated.

◆ RLPXPacket() [2/4]

dev::p2p::RLPXPacket::RLPXPacket ( uint8_t  _capId,
bytesConstRef  _in 
)
inline

Construct packet from single bytestream. RLPStream data is invalidated.

◆ RLPXPacket() [3/4]

dev::p2p::RLPXPacket::RLPXPacket ( RLPXPacket const &  _p)
delete

◆ RLPXPacket() [4/4]

dev::p2p::RLPXPacket::RLPXPacket ( RLPXPacket &&  _p)
inline

Member Function Documentation

◆ append()

bool dev::p2p::RLPXPacket::append ( bytesConstRef  _in)
inline

Appends byte data and returns if packet is valid.

◆ cap()

uint8_t dev::p2p::RLPXPacket::cap ( ) const
inline

◆ data()

bytes const& dev::p2p::RLPXPacket::data ( ) const
inline

◆ isValid()

virtual bool dev::p2p::RLPXPacket::isValid ( ) const
inlinevirtualnoexcept

◆ size()

size_t dev::p2p::RLPXPacket::size ( ) const
inline

◆ type()

bytes const& dev::p2p::RLPXPacket::type ( ) const
inline

Member Data Documentation

◆ m_cap

uint8_t dev::p2p::RLPXPacket::m_cap
protected

◆ m_data

bytes dev::p2p::RLPXPacket::m_data
protected

◆ m_type

bytes dev::p2p::RLPXPacket::m_type
protected

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