(block->parent! message-loop-name logger log-state ->parent send-buf)
Actually send the message block to the parent
Actually send the message block to the parent
(build-message-block-description log-state
{start-pos :frereth.cp.message.specs/start-pos
next-message-id
:frereth.cp.message.specs/message-id
buf :frereth.cp.message.specs/buf
:as block-to-send})
(calculate-message-data-packet-length-flags
{:keys [:frereth.cp.message.specs/buf] :as block})
(calculate-padded-size {:keys [:frereth.cp.message.specs/buf] :as block})
Set the number of bytes we're going to send for this block
Set the number of bytes we're going to send for this block
(check-for-new-block-to-send
{:keys [:frereth.cp.message.specs/message-loop-name]
{:keys [:frereth.cp.message.specs/max-block-length
:frereth.cp.message.specs/ackd-addr
:frereth.cp.message.specs/send-eof :frereth.cp.message.specs/strm-hwm
:frereth.cp.message.specs/un-sent-blocks]
:as outgoing}
:frereth.cp.message.specs/outgoing
:as state})
Q: Is there a new block ready to send?
357-378: Sets up a new block to send Along w/ related data flags in parallel arrays
Q: Is there a new block ready to send? 357-378: Sets up a new block to send Along w/ related data flags in parallel arrays
(check-for-previous-block-to-resend
{:keys [:frereth.cp.message.specs/message-loop-name
:frereth.cp.message.specs/recent]
{:keys [:frereth.cp.message.specs/earliest-time
:frereth.cp.message.specs/last-panic
:frereth.cp.message.specs/un-ackd-blocks]
:as outgoing}
:frereth.cp.message.specs/outgoing
{:keys [:frereth.cp.message.specs/last-edge
:frereth.cp.message.specs/n-sec-per-block
:frereth.cp.message.specs/rtt-timeout]}
:frereth.cp.message.specs/flow-control
log-state :frereth.weald.specs/state
:as state})
Return value includes next-block-queue, if we should resend ;;; 339-356: Try re-sending an old block: (DJB) ;;; Picks out the oldest block that's waiting for an ACK ;;; If it's older than (+ lastpanic (* 4 rtt_timeout)) ;;; Double nsecperblock ;;; Update trigger times ;;; goto sendblock
Return value includes next-block-queue, if we should resend ;;; 339-356: Try re-sending an old block: (DJB) ;;; Picks out the oldest block that's waiting for an ACK ;;; If it's older than (+ lastpanic (* 4 rtt_timeout)) ;;; Double nsecperblock ;;; Update trigger times ;;; goto sendblock
(mark-block-resent {:keys [:frereth.cp.message.specs/message-loop-name
:frereth.cp.message.specs/outgoing]
:as state}
prev-block
updated-block)
(mark-block-sent {{:keys [:frereth.cp.message.specs/send-eof
:frereth.cp.message.specs/un-sent-blocks
:frereth.cp.message.specs/un-ackd-blocks]
:as outgoing}
:frereth.cp.message.specs/outgoing
:keys [:frereth.cp.message.specs/message-loop-name]
:as state}
updated-block)
Move block from un-sent to un-acked
Move block from un-sent to un-acked
(maybe-send-block! {:keys [:frereth.weald.specs/logger
:frereth.cp.message.specs/->parent]
:as io-handle}
{:keys [:frereth.cp.message.specs/message-loop-name]
log-state :frereth.weald.specs/state
:as state})
Possibly send a block from child to parent
Possibly send a block from child to parent
(ok-to-send-new? {:keys [:frereth.cp.message.specs/message-loop-name
:frereth.cp.message.specs/recent]
{:keys [:frereth.cp.message.specs/earliest-time
:frereth.cp.message.specs/send-eof
:frereth.cp.message.specs/strm-hwm
:frereth.cp.message.specs/un-ackd-blocks
:frereth.cp.message.specs/un-sent-blocks
:frereth.cp.message.specs/want-ping]
:as outgoing}
:frereth.cp.message.specs/outgoing
{:keys [:frereth.cp.message.specs/n-sec-per-block]}
:frereth.cp.message.specs/flow-control
log-state :frereth.weald.specs/state
:as state})
(pick-next-block-to-send state)
(pre-calculate-state-after-send
{:keys [:frereth.cp.message.specs/message-loop-name
:frereth.cp.message.specs/recent]
{:keys [:frereth.cp.message.specs/next-block-queue
:frereth.cp.message.specs/send-buf-size]
current-message-id :frereth.cp.message.specs/next-message-id
:as outgoing}
:frereth.cp.message.specs/outgoing
log-state :frereth.weald.specs/state
:as state})
Calculate what the state will be after the send
Calculate what the state will be after the send
(send-eof-buffered? {:keys [:frereth.cp.message.specs/send-eof
:frereth.cp.message.specs/un-sent-blocks]
:as outgoing})
Has the EOF packet been set up to send?
Has the EOF packet been set up to send?
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close