sendRequest<T extends Result?> method

Future<T> sendRequest<T extends Result?>(
  1. String methodName, [
  2. Request? request
])
inherited

Sends request to the peer, and handles coercing the response to the type T.

Closes any progress streams for request once the response has been received.

Implementation

Future<T> sendRequest<T extends Result?>(
  String methodName, [
  Request? request,
]) async {
  try {
    return await sendRequestKeepingProgress<T>(methodName, request);
  } finally {
    await closeProgress(request);
  }
}