Thanks for the reply. Apologies in delayed acknowledge. You are right. The
problem was in my asynchronous calls to this particular piece of code.
The above code works fine.
On Thursday, October 6, 2016 at 2:12:40 AM UTC-4, Jan Tattermusch wrote:
> I skimmed through your code and it looks alright (perhaps I missed
> something?). What line does throw in your case?
> To answer your questions:
> The response stream is ready immediately after starting your call and you
> don't even need to send any requests nor close the request stream to be
> able to read from responseStream (so your code really should work).
> Also, if you need to just subscribe for server updates, perhaps the
> bi-streaming call is an overkill - you could start a server-streaming call,
> where you send a unary request (with you subscription details) and then
> keep reading from the response stream (but your example should work).
>> I am trying to work on a grpc C# client that initiates a subscription
>> type call with a grpc server. I believe I sent the subscription correctly
>> but am not able to read from the response stream correctly. I try to await
>> on the AsyncEnumerator.MoveNext() task but I get a null reference exception
>> on the below code.
>> var asyncCall = client.Subscribe();
>> var responseStream = asyncCall.ResponseStream;
>> await asyncCall.RequestStream.CompleteAsync();
>> while (await responseStream.MoveNext())
>> var tresp = asyncCall.ResponseStream.Current;
>> // print tresp message.
>> After having sent an RPC call, does the ResponseStream get initialized
>> immediately ? My guide for this has been
>> You received this message because you are subscribed to the Google Groups
>> "grpc.io" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> To post to this group, send email to grp...@googlegroups.com
>> Visit this group at https://groups.google.com/group/grpc-io.
>> To view this discussion on the web visit
>> For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to email@example.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit
For more options, visit https://groups.google.com/d/optout.