AngelHttp2.custom constructor

AngelHttp2.custom(
  1. Angel app,
  2. SecurityContext ctx,
  3. Future<SecureServerSocket> serverGenerator(
    1. InternetAddress? address,
    2. int port,
    3. SecurityContext ctx
    ), {
  4. bool useZone = true,
  5. bool allowHttp1 = false,
  6. ServerSettings? settings,
})

Implementation

factory AngelHttp2.custom(
    Angel app,
    SecurityContext ctx,
    Future<SecureServerSocket> Function(
            InternetAddress? address, int port, SecurityContext ctx)
        serverGenerator,
    {bool useZone = true,
    bool allowHttp1 = false,
    ServerSettings? settings}) {
  return AngelHttp2._(app, (address, port) {
    var addr = address is InternetAddress
        ? address
        : InternetAddress(address.toString());
    return Future.sync(() => serverGenerator(addr, port, ctx));
  }, useZone, allowHttp1, settings);
}