Support three levels of interest-type for a topic: participant/ordinary, monitor/observer, and "super-monitor".
This commit is contained in:
parent
28cc220010
commit
a0c60fd8db
|
@ -34,14 +34,7 @@
|
|||
[(topic 'publisher (tcp-channel remote-addr (== server-addr) _) #f)
|
||||
(transition state
|
||||
(spawn (session-vm server-addr remote-addr)
|
||||
#:debug-name (list 'ssh-session-vm remote-addr)))]
|
||||
;; PAPER NOTE: This second clause can be replaced with
|
||||
;; [_ state] for presentation economy
|
||||
[(topic 'publisher (tcp-channel remote-addr (== server-addr) _) #t)
|
||||
;; Ignore monitor flows. They just mean there's
|
||||
;; someone willing to supply connections to us
|
||||
;; at some point in the future.
|
||||
state]))))
|
||||
#:debug-name (list 'ssh-session-vm remote-addr)))]))))
|
||||
|
||||
;;---------------------------------------------------------------------------
|
||||
|
||||
|
@ -67,16 +60,12 @@
|
|||
(flush-output)
|
||||
state])
|
||||
(at-meta-level
|
||||
(role 'channel-listener (topic-subscriber (channel-message (channel-stream-name #t (wild))
|
||||
(wild)))
|
||||
(role 'channel-listener (topic-subscriber (channel-message (channel-stream-name #t (wild)) (wild)))
|
||||
#:state state
|
||||
#:topic t
|
||||
#:on-presence
|
||||
(if (topic-monitor? t)
|
||||
state
|
||||
(match t
|
||||
[(topic _ (channel-message (channel-stream-name _ cname) _) _)
|
||||
(transition state (spawn (repl-instance cname) #:debug-name cname))]))))))
|
||||
#:on-presence (match t
|
||||
[(topic _ (channel-message (channel-stream-name _ cname) _) _)
|
||||
(transition state (spawn (repl-instance cname) #:debug-name cname))])))))
|
||||
|
||||
(define (repl-instance cname)
|
||||
(define inbound-stream (channel-stream-name #t cname))
|
||||
|
|
|
@ -687,10 +687,6 @@
|
|||
#:topic t
|
||||
#:on-presence
|
||||
(match t
|
||||
[(topic _ _ #t)
|
||||
;; Monitor topics appearing indicate receptivity to incoming
|
||||
;; channels, and are nothing to do with outgoing channels.
|
||||
conn]
|
||||
[(or (topic 'publisher (channel-message (channel-stream-name #f cname) _) #f)
|
||||
(topic 'subscriber (channel-message (channel-stream-name #t cname) _) #f))
|
||||
(if (and (ground? cname)
|
||||
|
|
Loading…
Reference in New Issue