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]> 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]. > 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/CACV55uwc%3Dpa044VA9V_VH3psK_EDZzQoiaY7LtnAVk4gVjKLCg%40mail.gmail.com.
