close method

  1. @override
Future<void> close({
  1. bool force = false,
})
override

Closes the server and returns a future that completes when all resources are released.

Implementation

@override
Future<void> close({bool force = false}) async {
  try {
    await server.close(force: force);
    await messageHub.close();
  } catch (error, stackTrace) {
    sendPort.send(<Object>[error, stackTrace]);
  }

  receivePort.close();
}