Hello,
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
https://github.com/grpc/grpc/blob/v1.0.0/examples/csharp/route_guide/RouteGuideClient/Program.cs.
Thanks,
Naman
--
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 email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit
https://groups.google.com/d/msgid/grpc-io/3c54b44d-bdeb-48c3-a0c3-c804dca2ca87%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.