Liking cljdoc? Tell your friends :D

frereth.cp.message.to-parent


block->parent!clj

(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
sourceraw docstring

build-message-block-descriptionclj

(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})
source

calculate-message-data-packet-length-flagsclj

(calculate-message-data-packet-length-flags
  {:keys [:frereth.cp.message.specs/buf] :as block})
source

calculate-padded-sizeclj

(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
sourceraw docstring

check-for-new-block-to-sendclj

(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
sourceraw docstring

check-for-previous-block-to-resendclj

(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
sourceraw docstring

mark-block-resentclj

(mark-block-resent {:keys [:frereth.cp.message.specs/message-loop-name
                           :frereth.cp.message.specs/outgoing]
                    :as state}
                   prev-block
                   updated-block)
source

mark-block-sentclj

(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
sourceraw docstring

maybe-send-block!clj

(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
sourceraw docstring

ok-to-send-new?clj

(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})
source

pick-next-block-to-sendclj

(pick-next-block-to-send state)
source

pre-calculate-state-after-sendclj

(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
sourceraw docstring

send-eof-buffered?clj

(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?
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close