Closer to working outbound connections
This commit is contained in:
parent
89acb53a43
commit
0bf2033d44
12
tcp.rkt
12
tcp.rkt
|
@ -365,11 +365,10 @@
|
||||||
(gestalt-union
|
(gestalt-union
|
||||||
local-peer-detector
|
local-peer-detector
|
||||||
listener-detector
|
listener-detector
|
||||||
(if (conn-state-syn-acked? s)
|
(sub (tcp-channel dst src ?))
|
||||||
(gestalt-union (sub (tcp-channel dst src ?))
|
(if (and (conn-state-syn-acked? s)
|
||||||
(if (not (buffer-finished? (conn-state-inbound s)))
|
(not (buffer-finished? (conn-state-inbound s))))
|
||||||
(pub (tcp-channel src dst ?))
|
(pub (tcp-channel src dst ?))
|
||||||
(gestalt-empty)))
|
|
||||||
(gestalt-empty))))
|
(gestalt-empty))))
|
||||||
(gestalt-union (sub (timer-expired (timer-name ?) ?))
|
(gestalt-union (sub (timer-expired (timer-name ?) ?))
|
||||||
worldward-facing-gestalt
|
worldward-facing-gestalt
|
||||||
|
@ -547,7 +546,8 @@
|
||||||
(define is-fin? (set-member? flags 'fin))
|
(define is-fin? (set-member? flags 'fin))
|
||||||
(if (and (not expected) ;; no syn yet
|
(if (and (not expected) ;; no syn yet
|
||||||
(or (not is-syn?) ;; and this isn't it
|
(or (not is-syn?) ;; and this isn't it
|
||||||
(not (conn-state-listener-listening? s)))) ;; or it is, but no-one local cares
|
(and (not (conn-state-listener-listening? s)) ;; or it is, but no listener...
|
||||||
|
(not (conn-state-local-peer-seen? s))))) ;; ...and no outbound client
|
||||||
(reset ackn ;; this is *our* seqn
|
(reset ackn ;; this is *our* seqn
|
||||||
(seq+ seqn (+ (if is-syn? 1 0) (if is-fin? 1 0)))
|
(seq+ seqn (+ (if is-syn? 1 0) (if is-fin? 1 0)))
|
||||||
;; ^^ this is what we should acknowledge...
|
;; ^^ this is what we should acknowledge...
|
||||||
|
|
Loading…
Reference in New Issue