forked from Qortal/qortal
3505788d42
Instead of synchronizing/blocking in Peer.sendMessage(), we queue messages in a concurrent blocking TransferQueue, with timeout. In EPC, ChannelWriteTasks consume from TransferQueue, unblocking callers to Peer.sendMessage(). If a new message is to be sent, or socket output buffer is full, then OP_WRITE is used to wait for socket to become writable again. Only one ChannelWriteTask per peer can be active/pending at a time. Each ChannelWriteTask tries to send as much as it can in one go. Other minor tidy-ups. |
||
---|---|---|
.. | ||
main | ||
test |