Thank you for the helpful suggests. On Tuesday, August 20, 2019 at 1:26:15 PM UTC+8, Thomas Mercier wrote: > > Hi, > > This is what you want for problem 1: > > ChannelArguments args; > args.SetInt(GRPC_ARG_USE_LOCAL_SUBCHANNEL_POOL, 1); > > > https://stackoverflow.com/questions/53564748/how-do-i-force-my-grpc-client-to-open-multiple-connections-to-the-server > > Easiest way to cycle a connection is probably to destroy the stub and make > a new one. > > > You probably want none of this for performance. > > On Mon, Aug 19, 2019 at 8:11 PM xia rui <[email protected] <javascript:>> > wrote: > >> Hello everyone. >> I am using gRPC to build a simple client-server application. In the >> client side, I start multiple threads to send requests to a server (target >> is an identical gRPC call). In the server side, it opens a socket >> (localhost:50051) and waits for requests. >> >> Now, I create three request sending worker-threads at the client. But, *ONLY >> one TCP connection is setup*. My first problem is *Is it possible that >> each worker-thread sets up a sole TCP connection?* >> >> During the whole sending procedure, I find there is no new TCP >> connection. So the TCP connection is set up only once. My second problem is >> *Is >> it possible to break an old TCP connection and re-connection it?* >> >> Thank you for your time. >> >> Best wishes, >> Xia Rui >> >> -- >> 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 view this discussion on the web visit >> https://groups.google.com/d/msgid/grpc-io/608abe11-17cd-4bf2-8712-625a3598b60e%40googlegroups.com >> >> <https://groups.google.com/d/msgid/grpc-io/608abe11-17cd-4bf2-8712-625a3598b60e%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> >
-- 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 view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/08e64a87-8590-4483-9e86-d9640af0f702%40googlegroups.com.
