Thanks a lot. Now it is all clear. W dniu środa, 2 listopada 2016 18:30:18 UTC+1 użytkownik Michael Lumish napisał: > > Yes, you can use a single client to make multiple simultaneous calls. In > fact, this connection sharing is one of the major benefits of using gRPC. > > You can't exactly check the current status, but you can use > grpc.waitForClientReady, which calls your callback when either the client > has finished attempting to connect or the deadline has passed, and passes > an error if the client has not connected successfully. But using that > function is generally unnecessary. If you make a call on a client that is > not currently connected, it will do the right thing and start trying to > connect. > > On Wed, Nov 2, 2016 at 6:06 AM lsk <[email protected] <javascript:>> > wrote: > >> Hi I tried to find info about it but failed. I'm using grpc nodejs client >> in Express.js server app and I can not figure out if I can share a client >> object instance between multiple http request. >> >> I already figure out that I need to use promises to properly achieve >> Async calls. But that is another story. Each http request is managed by >> Express middelware stack, which define a set of functions which will be >> called before returning the response (in simplication). At some point I >> call let say client.sayHello(). Can I do that? Or do I need to have a pool >> of client object? >> >> Also how to check the status of client connection? If it is busy, ready, >> etc.? >> >> Lsk. >> >> -- >> 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] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> 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/de61e8d7-9e48-4302-ac23-73b0da4021d3%40googlegroups.com >> >> <https://groups.google.com/d/msgid/grpc-io/de61e8d7-9e48-4302-ac23-73b0da4021d3%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/0252186a-716a-445a-afd0-0ad4e596f955%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
