diff options
author | David Thompson <dthompson2@worcester.edu> | 2015-11-08 17:38:00 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2015-11-08 17:39:17 -0500 |
commit | c18894ddb3b1dbfb94deea28114bce4967af2119 (patch) | |
tree | 6329ec35c20c3d597cc4e4ac993f9bb623227b71 | |
parent | d0589bf0bed29e08c87bc4f4da7b217d524f199a (diff) |
frame: Improve doc strings and comments.
-rw-r--r-- | web/socket/frame.scm | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/web/socket/frame.scm b/web/socket/frame.scm index 032db77..7186c00 100644 --- a/web/socket/frame.scm +++ b/web/socket/frame.scm @@ -62,15 +62,26 @@ (set-record-type-printer! <frame> display-frame) (define* (make-pong-frame bv #:optional (masking-key #f)) + "Return a \"pong\" control frame containing the contents of the +bytevector BV, masked with MASKING-KEY. By default, the data is +unmasked." (make-frame #t 'pong masking-key bv)) (define* (make-close-frame bv #:optional (masking-key #f)) + "Return a \"close\" control frame containing the contents of the +bytevector BV, masked with MASKING-KEY. By default, the data is +unmasked." (make-frame #t 'close masking-key bv)) -(define* (make-text-frame str #:optional (masking-key #f)) - (make-frame #t 'text masking-key (string->utf8 str))) +(define* (make-text-frame text #:optional (masking-key #f)) + "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))) (define* (make-binary-frame bv #:optional (masking-key #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)) (define (continuation-frame? frame) @@ -229,7 +240,7 @@ MASKING-KEY." (not (zero? (logand #x80 octet)))) (define (parse-opcode octet final?) - ;; The opcode is stored in the least-significant nibble of the + ;; The opcode is stored in the least significant nibble of the ;; octet. (let ((type (opcode->frame-type (logand #x0f octet)))) ;; Section 5.5 specifies that control frames must not be |