From 2d1a0c7ace538146e2b841620779867aaec17753 Mon Sep 17 00:00:00 2001 From: Andrew Whatson Date: Wed, 19 Apr 2023 23:11:48 +1000 Subject: client: Support secure websockets. * web/socket/client.scm (make-client-socket): Add verify-certificate? parameter. Call open-socket-for-uri to create the socket. (handshake): Flush the port after writing the request. (make-websocket): Add #:verify-certificate? parameter. * web/socket/frame.scm (write-frame): Flush the port after writing the frame. --- web/socket/frame.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'web/socket/frame.scm') diff --git a/web/socket/frame.scm b/web/socket/frame.scm index f54f016..f3709f6 100644 --- a/web/socket/frame.scm +++ b/web/socket/frame.scm @@ -372,4 +372,5 @@ MASKING-KEY." (when mask (put-bytevector port mask)) ;; Write data, potentially masked. - (put-bytevector port (if mask (masked-data mask data) data)))) + (put-bytevector port (if mask (masked-data mask data) data)) + (force-output port))) -- cgit v1.2.3