ServerBinder typedef

ServerBinder = Future<HttpServer> Function(int port, Object? address)

Opens the HTTP server of one port, for CustomServer. address is AppConfig.host (or APP_HOST), null for all interfaces.

Dox calls it in every server isolate, for the main port and for each port of AppConfig.additionalPorts and AppConfig.ports. So each isolate must be able to bind the same port: use shared: true with dart:io.

Implementation

typedef ServerBinder = Future<HttpServer> Function(int port, Object? address);