readResponse method

  1. @override
Future<WorkResponse> readResponse()
override

Implementation

@override
Future<WorkResponse> readResponse() async {
  if (!await _receivePortIterator.moveNext()) {
    return WorkResponse(
      exitCode: EXIT_CODE_BROKEN_PIPE,
      output: 'Connection to worker closed.',
    );
  }
  return WorkResponse.fromBuffer(_receivePortIterator.current as List<int>);
}