Cool, thanks a lot, this is the sample code, right? https://github.com/grpc/grpc-java/issues/1648 And at the moment it is only for Java client, right?
On Mon, Mar 27, 2017 at 11:45 PM, 'Kun Zhang' via grpc.io < [email protected]> wrote: > Ideally gRPC client library should detect the stuck connection and give > you an error, which is what the keep-alive option tries to achieve. > > On Saturday, March 25, 2017 at 8:21:38 AM UTC-7, Carfield Yim wrote: >> >> oh, I see, so even if the server just don't get stuck, I should still get >> an exception at on error? >> >> On Sat, Mar 25, 2017 at 2:13 AM, Kun Zhang <[email protected]> wrote: >> >>> You shouldn't care about http status if you are using gRPC. gRPC has its >>> own status space. >>> Like I said before, Java provides the keep-alive option, which allows >>> the client to detect connectivity issue in a timely manner. >>> >>> Of course you will need to find out first if it's due to a bug on the >>> server. >>> >>> >>> On Wednesday, March 22, 2017 at 6:29:31 PM UTC-7, Carfield Yim wrote: >>>> >>>> Can we use that? How if the Http is alive but there is no update, say >>>> the server is live but the data somehow no publishing, maybe just a bug at >>>> server that make the data stop published. Can we still use http status for >>>> that? >>>> >>>> On Thursday, March 23, 2017 at 2:19:02 AM UTC+8, Kun Zhang wrote: >>>>> >>>>> The keep-alive feature can be helpful for detecting broken connection >>>>> on the Java client. >>>>> Use OkHttpChannelBuilder.enableKeepAlive() >>>>> <https://github.com/grpc/grpc-java/blob/v1.2.0/okhttp/src/main/java/io/grpc/okhttp/OkHttpChannelBuilder.java#L157> >>>>> or NettyChannelBuilder.enableKeepAlive() >>>>> <https://github.com/grpc/grpc-java/blob/v1.2.0/netty/src/main/java/io/grpc/netty/NettyChannelBuilder.java#L248> >>>>> to turn it on. >>>>> However, the Netty keep-alive implementation is buggy as of 1.2.0 ( >>>>> https://github.com/grpc/grpc-java/issues/2828), and we are working on >>>>> it. >>>>> >>>>> Not sure if C# client has the same feature. I will leave it to the C >>>>> core folks [+ctiller] >>>>> >>>>> On Tuesday, March 21, 2017 at 11:02:01 PM UTC-7, Carfield Yim wrote: >>>>>> >>>>>> Thanks, it is Java server and C# client, maybe Java client >>>>>> >>>>>> On Wednesday, March 22, 2017 at 1:20:31 PM UTC+8, Makarand >>>>>> Dharmapurikar wrote: >>>>>>> >>>>>>> Which language is this in? >>>>>>> >>>>>>> On Tue, Mar 21, 2017 at 7:58 PM, Carfield Yim <[email protected]> >>>>>>> wrote: >>>>>>> >>>>>>>> HI, I am a new user of grpc and using the steaming feature to let >>>>>>>> the server continue pushing update to client. >>>>>>>> >>>>>>>> But there maybe case where somehow the server get some issue and >>>>>>>> the connection still there, so no exception, but just the update is not >>>>>>>> pushing. Can I detect this as timeout event? Or I have to start a >>>>>>>> thread at >>>>>>>> client side to check if the data keep pushing from server? >>>>>>>> >>>>>>>> Thanks >>>>>>>> >>>>>>>> -- >>>>>>>> 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/50294c65-b645-4490 >>>>>>>> -86d4-0144aea62c7f%40googlegroups.com >>>>>>>> <https://groups.google.com/d/msgid/grpc-io/50294c65-b645-4490-86d4-0144aea62c7f%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>>>> . >>>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>>> >>>>>>> >>>>>>> >> -- > You received this message because you are subscribed to a topic in the > Google Groups "grpc.io" group. > To unsubscribe from this topic, visit https://groups.google.com/d/ > topic/grpc-io/mrY1MMzBn9w/unsubscribe. > To unsubscribe from this group and all its topics, 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/5cb76963-1383-4049-9042-bc323d39ba16%40googlegroups.com > <https://groups.google.com/d/msgid/grpc-io/5cb76963-1383-4049-9042-bc323d39ba16%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- 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/CACfbOvcwkX-WuBU7u9MN5EeQQ4ATGwUvCY5Sw3PTQ%2BZws4-Bqg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
