Introduce send-feedback
This commit is contained in:
parent
09a957a54e
commit
90c00f7595
|
@ -67,12 +67,12 @@
|
||||||
;; TcpAddress TcpAddress NonNegativeInteger -> Preaction
|
;; TcpAddress TcpAddress NonNegativeInteger -> Preaction
|
||||||
;; Sends a credit message on a channel using the correct (subscriber) role.
|
;; Sends a credit message on a channel using the correct (subscriber) role.
|
||||||
(define (send-tcp-credit source-addr sink-addr amount)
|
(define (send-tcp-credit source-addr sink-addr amount)
|
||||||
(send-message (tcp-channel source-addr sink-addr (tcp-credit amount)) 'subscriber))
|
(send-feedback (tcp-channel source-addr sink-addr (tcp-credit amount))))
|
||||||
|
|
||||||
;; TcpAddress TcpAddress TcpModeName -> Preaction
|
;; TcpAddress TcpAddress TcpModeName -> Preaction
|
||||||
;; Sends a mode selection message on a channel using the correct (subscriber) role.
|
;; Sends a mode selection message on a channel using the correct (subscriber) role.
|
||||||
(define (send-tcp-mode source-addr sink-addr mode-name)
|
(define (send-tcp-mode source-addr sink-addr mode-name)
|
||||||
(send-message (tcp-channel source-addr sink-addr (tcp-mode mode-name)) 'subscriber))
|
(send-feedback (tcp-channel source-addr sink-addr (tcp-mode mode-name))))
|
||||||
|
|
||||||
;; TcpAddresses; represents various wildcard addresses
|
;; TcpAddresses; represents various wildcard addresses
|
||||||
(define any-remote (tcp-address (wild) (wild)))
|
(define any-remote (tcp-address (wild) (wild)))
|
||||||
|
|
3
os2.rkt
3
os2.rkt
|
@ -41,6 +41,7 @@
|
||||||
(rename-out [make-delete-role delete-role])
|
(rename-out [make-delete-role delete-role])
|
||||||
(except-out (struct-out send-message) send-message)
|
(except-out (struct-out send-message) send-message)
|
||||||
(rename-out [make-send-message send-message])
|
(rename-out [make-send-message send-message])
|
||||||
|
send-feedback ;; TODO: maybe call this "send-reply" or "send-as-subscriber"?
|
||||||
(except-out (struct-out spawn) spawn)
|
(except-out (struct-out spawn) spawn)
|
||||||
(rename-out [make-spawn spawn])
|
(rename-out [make-spawn spawn])
|
||||||
(except-out (struct-out kill) kill)
|
(except-out (struct-out kill) kill)
|
||||||
|
@ -273,6 +274,8 @@
|
||||||
(define (make-send-message body [role 'publisher]) (send-message body role))
|
(define (make-send-message body [role 'publisher]) (send-message body role))
|
||||||
(define (make-kill [pid #f] #:reason [reason #f]) (kill pid reason))
|
(define (make-kill [pid #f] #:reason [reason #f]) (kill pid reason))
|
||||||
|
|
||||||
|
(define (send-feedback body) (make-send-message body 'subscriber))
|
||||||
|
|
||||||
(define (make-spawn raw-spec [k #f]
|
(define (make-spawn raw-spec [k #f]
|
||||||
#:monitor? [monitor? #f]
|
#:monitor? [monitor? #f]
|
||||||
#:debug-name [debug-name #f]
|
#:debug-name [debug-name #f]
|
||||||
|
|
Loading…
Reference in New Issue