def close.code.ok

bend-kit-websocket@0.4.0.0 · websocket.bend:720

import bend-kit-websocket@0.4.0.0/websocket.bend as Websocket
import Base

720# Codes a peer may send: §7.4.1, the IANA registry through 1014, and 3000-4999.
721def close.code.ok(+c: U32) -> Bool:
722  Bool.or(Bool.and(U32.is_ge(c, 1000), U32.is_le(c, 1003)),
723    Bool.or(Bool.and(U32.is_ge(c, 1007), U32.is_le(c, 1014)),
724      Bool.and(U32.is_ge(c, 3000), U32.is_le(c, 4999))))

Uses (6)

Used by (1)