def header.err
bend-kit-websocket@0.4.0.0 · websocket.bend:394
import bend-kit-websocket@0.4.0.0/websocket.bend as Websocket
import Base
394
395def header.err(+masked: Bool, +b0: U32, +m: Bool, +hi: U32, +len: U32) -> Maybe<&1, U32 & String>:
396 first(rules(U32.is_ne((b0 .&. 128 : U32), 0), ((b0 >> 4n) .&. 7 : U32), (b0 .&. 15 : U32), Bool.pick(U32, U32.is_eq(hi, 0), len, 4294967295)),
397 first(reject(Bool.xor(m, masked), 1002, "mask bit does not match the peer's role"),
398 reject(U32.is_ne(hi, 0), 1009, "frame over the size limit")))