fromCode static method

WebSocketOpcode? fromCode(
  1. int code
)

Implementation

static WebSocketOpcode? fromCode(int code) => switch (code) {
  0x0 => continuation,
  0x1 => text,
  0x2 => binary,
  0x8 => close,
  0x9 => ping,
  0xa => pong,
  _ => null,
};