How to check if ALPN contains h2?
opened this issue · comments
Deleted user commented
like this
// getAlpnProtocols as List<String>
if (context.getAlpnProtocols.contains('h2')) {
final server = await MultiProtocolHttpServer.bind(address, port ?? 443, context);
// code ...
} else {
final server = await HttpServer.bindSecure(address, port ?? 443, context);
// code ...
}```
Moritz commented
This would be on SecurityContext
, which is part of dart:io
.