![]() |
Fabcoin Core
0.16.2
P2P Digital Currency
|
#include <RLPXSocketIO.h>
Public Member Functions | |
| RLPXSocketIO (unsigned _protCount, RLPXFrameCoder &_coder, bi::tcp::socket &_socket, bool _flowControl=true, size_t _initialCapacity=DefaultInitialCapacity) | |
| void | send (unsigned _protocolType, unsigned _type, RLPStream &_payload) |
| void | doWrite () |
Static Public Attributes | |
| static uint32_t const | MinFrameSize = h128::size * 3 |
| static uint32_t const | MaxPacketSize = 1 << 24 |
| static uint16_t const | DefaultInitialCapacity = 8 << 8 |
Private Member Functions | |
| void | deferWrite () |
| void | write (size_t _dequed) |
Static Private Member Functions | |
| static std::vector< RLPXFrameWriter > | writers (unsigned _capacity) |
Private Attributes | |
| bool const | m_flowControl |
| True if flow control is enabled. More... | |
| RLPXFrameCoder & | m_coder |
| Encoder/decoder of frame payloads. More... | |
| bi::tcp::socket & | m_socket |
| std::deque< bytes > | m_toSend |
| Reusable byte buffer for pending socket writes. More... | |
| std::vector< RLPXFrameWriter > | m_writers |
| Write queues for each protocol. TODO: map to bytes (of capability) More... | |
| std::unique_ptr< ba::deadline_timer > | m_congestion |
| Scheduled when writes are deferred due to congestion. More... | |
| Mutex | x_queued |
| unsigned | m_queued = 0 |
| Track total queued packets to ensure single write loop. More... | |
| uint32_t | m_egressCapacity |
Definition at line 33 of file RLPXSocketIO.h.
| RLPXSocketIO::RLPXSocketIO | ( | unsigned | _protCount, |
| RLPXFrameCoder & | _coder, | ||
| bi::tcp::socket & | _socket, | ||
| bool | _flowControl = true, |
||
| size_t | _initialCapacity = DefaultInitialCapacity |
||
| ) |
Definition at line 33 of file RLPXSocketIO.cpp.
|
private |
Definition at line 85 of file RLPXSocketIO.cpp.
| void RLPXSocketIO::doWrite | ( | ) |
Definition at line 61 of file RLPXSocketIO.cpp.
| void RLPXSocketIO::send | ( | unsigned | _protocolType, |
| unsigned | _type, | ||
| RLPStream & | _payload | ||
| ) |
|
private |
Definition at line 93 of file RLPXSocketIO.cpp.
|
staticprivate |
Definition at line 41 of file RLPXSocketIO.cpp.
|
static |
Definition at line 38 of file RLPXSocketIO.h.
|
private |
Encoder/decoder of frame payloads.
Definition at line 55 of file RLPXSocketIO.h.
|
private |
Scheduled when writes are deferred due to congestion.
Definition at line 61 of file RLPXSocketIO.h.
|
private |
Definition at line 65 of file RLPXSocketIO.h.
|
private |
True if flow control is enabled.
Definition at line 53 of file RLPXSocketIO.h.
|
private |
Track total queued packets to ensure single write loop.
Definition at line 64 of file RLPXSocketIO.h.
|
private |
Definition at line 56 of file RLPXSocketIO.h.
|
private |
Reusable byte buffer for pending socket writes.
Definition at line 58 of file RLPXSocketIO.h.
|
private |
Write queues for each protocol. TODO: map to bytes (of capability)
Definition at line 60 of file RLPXSocketIO.h.
|
static |
Definition at line 37 of file RLPXSocketIO.h.
|
static |
Definition at line 36 of file RLPXSocketIO.h.
|
private |
Definition at line 63 of file RLPXSocketIO.h.
1.8.11