X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=8sync%2Fsystems%2Fwebsocket%2Fframe.scm;h=35dc5511aec13da172bdb637be1337b6f466b20b;hb=715d98b09ba5745db5efc19e6d3de38e8eb38793;hp=831456a61cccb0580d9480cb7734f4be69ca2b89;hpb=9f0c24e3e0f610303b9af8ff979c8e4408713cc8;p=8sync.git diff --git a/8sync/systems/websocket/frame.scm b/8sync/systems/websocket/frame.scm index 831456a..35dc551 100644 --- a/8sync/systems/websocket/frame.scm +++ b/8sync/systems/websocket/frame.scm @@ -106,16 +106,16 @@ bytevector BV, masked with MASKING-KEY. By default, the data is unmasked." (make-frame #t 'close masking-key bv)) -(define* (make-text-frame text #:optional masking-key) +(define* (make-text-frame text #:optional masking-key #:key (final? #t) (continuation? #f)) ;; bah: optional "Return a text data frame containing the string TEXT, masked with MASKING-KEY. By default, the text is unmasked." - (make-frame #t 'text masking-key (string->utf8 text))) + (make-frame final? (if continuation? 'continuation 'text) masking-key (string->utf8 text))) -(define* (make-binary-frame bv #:optional masking-key) +(define* (make-binary-frame bv #:optional masking-key #:key (final? #t) (continuation? #f)) "Return a binary data frame containing the contents of the bytevector BV, masked with MASKING-KEY. By default, the data is unmasked." - (make-frame #t 'binary masking-key bv)) + (make-frame final? (if continuation? 'continuation 'binary) masking-key bv)) (define (continuation-frame? frame) "Return #t if FRAME is a continuation frame."