close method

Future<int> close()

Ends the conversation; the service ends too. Its exit code.

Implementation

Future<int> close() async {
  try {
    await _process.stdin.close();
  } on Object {
    // Already closed by the service.
  }
  await _lines.cancel();
  return _process.exitCode;
}