public async Task StreamingOutputCall(ServerCallContext context, StreamingOutputCallRequest request, IServerStreamWriter <StreamingOutputCallResponse> responseStream) { foreach (var responseParam in request.ResponseParametersList) { var response = StreamingOutputCallResponse.CreateBuilder() .SetPayload(CreateZerosPayload(responseParam.Size)).Build(); await responseStream.Write(response); } }
public void OnNext(StreamingOutputCallRequest value) { foreach (var responseParam in value.ResponseParametersList) { var response = StreamingOutputCallResponse.CreateBuilder() .SetPayload(CreateZerosPayload(responseParam.Size)).Build(); responseObserver.OnNext(response); } }
public void StreamingOutputCall(StreamingOutputCallRequest request, IObserver <StreamingOutputCallResponse> responseObserver) { foreach (var responseParam in request.ResponseParametersList) { var response = StreamingOutputCallResponse.CreateBuilder() .SetPayload(CreateZerosPayload(responseParam.Size)).Build(); responseObserver.OnNext(response); } responseObserver.OnCompleted(); }
public async Task FullDuplexCall(ServerCallContext context, IAsyncStreamReader <StreamingOutputCallRequest> requestStream, IServerStreamWriter <StreamingOutputCallResponse> responseStream) { await requestStream.ForEach(async request => { foreach (var responseParam in request.ResponseParametersList) { var response = StreamingOutputCallResponse.CreateBuilder() .SetPayload(CreateZerosPayload(responseParam.Size)).Build(); await responseStream.Write(response); } }); }
public void OnNext(StreamingOutputCallRequest value) { // TODO: this is not in order!!! //Task.Factory.StartNew(() => { foreach (var responseParam in value.ResponseParametersList) { var response = StreamingOutputCallResponse.CreateBuilder() .SetPayload(CreateZerosPayload(responseParam.Size)).Build(); responseObserver.OnNext(response); } //}); }