Support chaperoning tcp-listeners as evts.

Found by the Typed Racket test suite.
This commit is contained in:
Sam Tobin-Hochstadt 2019-07-14 12:06:07 -04:00 committed by Sam Tobin-Hochstadt
parent 228c3132ca
commit 997f5b583c
2 changed files with 7 additions and 1 deletions

View File

@ -307,6 +307,13 @@
(close-input-port r2)
(end)
;; ----------------------------------------
;; TCP listeners as events
(chaperone-evt (tcp-listen 0)
(lambda (e) (values e values)))
(start "TCP Echo, faster...\n")
(define-values (r w r2 w2) (setup-mzscheme-echo #t))
(close-input-port r)

View File

@ -19,7 +19,6 @@
(struct tcp-listener (lnr
closed ; boxed boolean
custodian-reference)
#:authentic
#:property prop:evt (poller (lambda (l ctx) (poll-listener l ctx))))
(define/who (tcp-listen port-no [max-allow-wait 4] [reuse? #f] [hostname #f])