invokeMethod

fun <S : Req, D : Rsp> invokeMethod(method: ChannelMethod, request: S, toResponse: (MethodCall) -> D): CompletableDeferred<D>