byCode static method

Protocol? byCode(
  1. int code
)

Returns the protocol for the given code, or null if no protocol has it

Implementation

static Protocol? byCode(int code) {
  for (final p in _protocols.values) {
    if (p.code == code) return p;
  }
  return null;
}