fromValue static method

tls_protocol_version_t fromValue(
  1. int value
)

Implementation

static tls_protocol_version_t fromValue(int value) => switch (value) {
  769 => tls_protocol_version_TLSv10,
  770 => tls_protocol_version_TLSv11,
  771 => tls_protocol_version_TLSv12,
  772 => tls_protocol_version_TLSv13,
  -257 => tls_protocol_version_DTLSv10,
  -259 => tls_protocol_version_DTLSv12,
  _ => throw ArgumentError('Unknown value for tls_protocol_version_t: $value'),
};