What you're seeing is called "subchannel sharing". Basically if two channels on the client side have exactly the same targets and all the options are the same, C core can decide to use the same TCP/IP connection for both channels. This is probably what's happening in your case and it seems that things are working as expected and there's nothing to worry about.
On Monday, March 11, 2019 at 1:06:22 PM UTC+1, Sam wrote: > > Hi all, > > I'm new to network programming in general and gRPC, so sorry if this is a > daft question... > > I'm using the C# implementation of gRPC and noticed something: I create a > server project (lets say with one service method) and a client project. > When I create more than one Channel to the server in the client project and > call the rpc method that's on the server, it seems that > the ServerCallContext.Peer property shows that the port use by both > channels are the same. > > To clarify, I have the following setup: > > - one server with one service method, always listening. > > - a client project that creates 2 channels to the server. > > > When I print the ServerCallContext.Peer : > peer is ipv6:[::1]:51048 // print from the first channels call > peer is ipv6:[::1]:51048 // print from the second channels call > > The port is the same. I tried executing the project twice (adding a for > loop + a delay to have both working parallel) to see what happens, it seems > that the port changes. I assume it's because they are from two different > processes. > > Anyway I'm just curious about why this is happening and what documentation > I should read to understand this (if any exists ofc) ? > > Sam > -- 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/0a119eb5-87e2-4257-b4cf-f7a65906f497%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
