52 std::deque<RLPXPacket>
q;
85 std::pair<WriterState, WriterState>
m_q;
Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Origi...
RLPXFrameWriter(RLPXFrameWriter const &_s)
std::deque< RLPXPacket > q
#define DEV_GUARDED(MUTEX)
Simple block guard.
size_t mux(RLPXFrameCoder &_coder, unsigned _size, std::deque< bytes > &o_toWrite)
Returns number of packets framed and outputs frames to o_bytes. Not thread-safe.
void enque(uint8_t _packetType, RLPStream &_payload, PacketPriority _priority=PriorityLow)
Moves output to queue, to be muxed into frames by mux() when network buffer is ready for writing...
Queue and state for Writer Properties are used independently; only valid packets should be added to q...
RLPXFrameWriter(uint16_t _protocolType)
size_t size() const
Returns total number of queued packets. Thread-safe.
uint16_t protocolId() const
static const uint16_t MinFrameDequeLength
static const uint16_t EmptyFrameLength
uint16_t const m_protocolId
Class for writing to an RLP bytestream.
Encoder/decoder transport for RLPx connection established by RLPXHandshake.
std::pair< WriterState, WriterState > m_q
Multiplex packets into encrypted RLPX frames.