chickadee » ws-client » frame-fin

ws-framerecord
frame-fin WS-FRAMEprocedure
frame-rsv WS-FRAMEprocedure
frame-opcode WS-FRAMEprocedure
frame-optype WS-FRAMEprocedure
frame-mask? WS-FRAMEprocedure
frame-payload-length WS-FRAMEprocedure
frame-payload-data WS-FRAMEprocedure

WebSocket messages are represented with the record type ws-frame.

For a frame f:

  • (frame-fin f) is #t iff the FIN bit is set.
  • (frame-rsv f) are the three RSV bits interpreted as an integer. For example, if exactly the RSV2 and RSV3 bits are set, (frame-rsv f) is 3.
  • (frame-opcode f) (resp. (frame-optype f) is the opcode (resp. optype) of f.
  • (frame-mask? f) is #t iff the MASK bit is set. This should be #t for every outbound frame and #f for every frame received. A ws-frame record retains no information about the masking key; masking/unmasking is handled quietly by the procedures send-frame and recv-frame.
  • The first (frame-payload-length f) bytes of the vector (frame-payload-data f) is the payload of f. Note that (frame-payload-length f) is not guaranteed to be the same as (u8vector-length (frame-payload-data f)).