Bitcoin full node and query server

Oct 14, 2021

View in context in the libbitcoin Slack #general mirror.

evoskuil18:30
ZeroMQ uses transparent and configurable work queues for both send and receive. This is a necessary strategy, and it’s sort of surprising that asio doesn’t natively expose controls on its queue. But as all problems in computer science can be resolved with another layer of abstraction, I’ve created a buffered_socket::socket, which maintains size/count read and write message queues. This will suspend read when the read buffer is full (blocking the peer) and overflow the send queue (drop writes) when the write buffer is full. The latter may cause an interruption of the expected protocol semantics, resulting in a dropped connection, though this is acceptable and unavoidable given the p2p protocol design. The other alternative is to drop the peer.
👍 2