コード例 #1
0
        public Task <SimpleResponse> UnaryCall(ServerCallContext context, SimpleRequest request)
        {
            var response = SimpleResponse.CreateBuilder()
                           .SetPayload(CreateZerosPayload(request.ResponseSize)).Build();

            return(Task.FromResult(response));
        }
コード例 #2
0
        public void UnaryCall(SimpleRequest request, IObserver <SimpleResponse> responseObserver)
        {
            var response = SimpleResponse.CreateBuilder()
                           .SetPayload(CreateZerosPayload(request.ResponseSize)).Build();

            //TODO: check we support ReponseType
            responseObserver.OnNext(response);
            responseObserver.OnCompleted();
        }