onStarted method

  1. @protected
  2. @override
Future<void> onStarted()
override

Start serving requests. Only called when ownsTransport.

Runs after the host is isRunning, so a connection accepted synchronously finds a host that is already up.

Throws UnimplementedError unless overridden.

Implementation

@protected
@override
Future<void> onStarted() async {
  _httpServer!.listen(_handleRequest);
}