diff --git a/collects/openssl/mzssl.rkt b/collects/openssl/mzssl.rkt index 339d72336e..d2ec22b506 100644 --- a/collects/openssl/mzssl.rkt +++ b/collects/openssl/mzssl.rkt @@ -270,7 +270,9 @@ (define-struct (ssl-client-context ssl-context) ()) (define-struct (ssl-server-context ssl-context) ()) - (define-struct ssl-listener (l mzctx)) + (define-struct ssl-listener (l mzctx) + #:property prop:evt (lambda (lst) (wrap-evt (ssl-listener-l lst) + (lambda (x) lst)))) ;; internal: (define-struct mzssl (ssl i o r-bio w-bio pipe-r pipe-w diff --git a/collects/openssl/openssl.scrbl b/collects/openssl/openssl.scrbl index 3a571d6868..a4eb3dae2d 100644 --- a/collects/openssl/openssl.scrbl +++ b/collects/openssl/openssl.scrbl @@ -139,8 +139,7 @@ Returns @scheme[#t] if @scheme[v] is a value produced by (or/c ssl-server-context? symbol?) 'sslv2-or-v3]) ssl-listener?]{ -Like @scheme[tcp-listen], but the result is an SSL listener (which is -a synchronizable value; see @scheme[sync]). The extra optional +Like @scheme[tcp-listen], but the result is an SSL listener. The extra optional @scheme[server-protocol] is as for @scheme[ssl-connect], except that a context must be a server context instead of a client context. @@ -149,7 +148,14 @@ Call @scheme[ssl-load-certificate-chain!] and error on accepting connections. The file @filepath{test.pem} in the @filepath{openssl} collection is a suitable argument for both calls when testing. Since @filepath{test.pem} is public, however, such a -test configuration obviously provides no security.} +test configuration obviously provides no security. + +An SSL listener is a synchronizable value (see @scheme[sync]). It is +ready---with itself as its value---when the underlying TCP listener is +ready. At that point, however, accepting a connection with +@racket[ssl-accept] may not complete immediately, because +further communication is needed to establish the connection.} + @deftogether[( @defproc[(ssl-close (listener ssl-listener?)) void?]