33 std::vector<RLPXPacket> ret;
46 uint32_t& remaining = m_incomplete.at(_info.
sequenceId).second;
49 remaining -= buffer.
size();
52 if(p.
append(buffer) && !remaining)
53 ret.push_back(std::move(p));
73 while (!buffer.
empty())
75 auto type = nextRLP(buffer);
80 auto packet = _info.
multiFrame ? buffer : nextRLP(buffer);
81 buffer = buffer.
cropped(packet.size());
88 ret.push_back(std::move(p));
90 m_incomplete.insert(std::make_pair(_info.
sequenceId, std::make_pair(std::move(p), remaining)));
Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Origi...
virtual bool isValid() const noexcept
A modifiable reference to an existing object or vector in memory.
bool append(bytesConstRef _in)
Appends byte data and returns if packet is valid.
bool authAndDecryptFrame(bytesRef io_cipherWithMac)
Authenticate and decrypt frame in-place.
std::hash for asio::adress
vector_ref< _T > cropped(size_t _begin, size_t _count) const
uint32_t const totalLength
Set to total length of packet in first frame of multiframe packet.
bool const multiFrame
If this frame is part of a sequence.
PlatformStyle::TableColorType type
uint8_t const size_t const size
Encoder/decoder transport for RLPx connection established by RLPXHandshake.
uint8_t const padding
Length of padding which follows .
uint16_t const sequenceId
Sequence ID of frame.