def next
import bend-kit-websocket@0.4.0.0/websocket.bend as Websocketimport Base
504# One frame from the front of b, unmasked. masked: this peer's frames must be masked
505# (true on a server, false on a client). max caps the payload length (1009 over it).
506def next(~P: Type, ~S: Type, ~prefix: S -> S & List<&2, U32>, ~fits: S -> @+hs:U32 -> @+len:U32 -> S & Bool, ~cut: S -> @+hs:U32 -> @+len:U32 -> P & S, ~unmask: @+key:U32 -> P -> P, +masked: Bool, +max: U32, b: S) -> Decode<P, S>:
507 next.start(~P, ~S, ~fits, ~cut, ~unmask, masked, max, prefix(b))