unary<I, O> function
Future<O>
unary<I, O>(
- Transport transport,
- Method method,
- I request,
- Codec<
I> input, - Codec<
O> output, { - CallOptions options = const CallOptions(),
Implementation
Future<O> unary<I, O>(Transport transport, Method method, I request,
Codec<I> input, Codec<O> output,
{CallOptions options = const CallOptions()}) async {
final call = await transport.open(method, options: options);
try {
await call.send(input.encode(request));
await call.halfClose();
return await _single(call, output);
} finally {
await call.close();
}
}