Client IP is not a reliable way to keep track of client. For example, you could have many clients sitting behind a proxy and they will share the ip address. I only use it for logging purpose. So depends on your use case.
On Mon, Jan 8, 2018 at 4:58 PM, 'Menghan Li' via grpc.io < [email protected]> wrote: > Ravi, > > In go, the client address is part of the peer struct in the RPC context ( > https://godoc.org/google.golang.org/grpc/peer#Peer). > > Use https://godoc.org/google.golang.org/grpc/peer#FromContext to get peer > out from the context. > > Thanks, > Menghan > > -- > 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/g9oittuh_6c/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/7f7797bb-3970-4b62-8e5a-eaa7e8f13e18%40googlegroups.com > <https://groups.google.com/d/msgid/grpc-io/7f7797bb-3970-4b62-8e5a-eaa7e8f13e18%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/CAL2p%3D0k3yRy0BW%2Bwx9RMa8n6FQLH9m5zT8tVQUf5x3wkfKW51Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
