From e72e22f2502f1af35b7f677c0f24eb10a6b8a597 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Mon, 28 Jan 2019 01:14:58 +0000 Subject: [PATCH] tcp-connection-peer --- syndicate/drivers/tcp.rkt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/syndicate/drivers/tcp.rkt b/syndicate/drivers/tcp.rkt index e594a3c..824dbf6 100644 --- a/syndicate/drivers/tcp.rkt +++ b/syndicate/drivers/tcp.rkt @@ -15,6 +15,7 @@ ;; b) no facility for separate shutdown of inbound/outbound streams (provide (struct-out tcp-connection) + (struct-out tcp-connection-peer) (struct-out tcp-accepted) (struct-out tcp-out) (struct-out tcp-in) @@ -39,6 +40,7 @@ ;; Protocol messages (assertion-struct tcp-connection (id spec)) +(assertion-struct tcp-connection-peer (id addr)) (assertion-struct tcp-accepted (id)) (message-struct tcp-out (id bytes)) (message-struct tcp-in (id bytes)) @@ -129,6 +131,7 @@ (define id (seal (list port remote-addr))) (spawn #:name (list 'drivers/tcp 'inbound id) (assert (tcp-connection id server-addr)) + (assert (tcp-connection-peer id remote-addr)) (define unblock! (run-connection id cin cout)) (on (asserted (tcp-accepted id)) (unblock!)) (stop-when (retracted (tcp-accepted id))))))