Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a way for server and client context to directly return peer IP. #14667

Closed
wants to merge 2 commits into from
Closed

Add a way for server and client context to directly return peer IP. #14667

wants to merge 2 commits into from

Conversation

mmoanis
Copy link

@mmoanis mmoanis commented Mar 10, 2018

The proposed change for #5693

A new struct PeerInfo is added to contain the peer information. Filling this struct exploit the fact that the peer's URI is always in the form PROTOCOL:IP:PORT

Since the issue is related to only the C++ API, I made the changes in it only.

Finally, I am not sure if this solves the problem of 'without string parsing' but though it is better to make the PR and discuss that. Also, the parsing of the URI may need to be in the struct CTOR.

@thelinuxfoundation
Copy link

Thank you for your pull request. Before we can look at your contribution, we need to ensure all contributors are covered by a Contributor License Agreement.

After the following items are addressed, please respond with a new comment here, and the automated system will re-verify.

Regards,
CLA GitHub bot

@mmoanis
Copy link
Author

mmoanis commented Mar 10, 2018

CLA signed.

@yang-g
Copy link
Member

yang-g commented Mar 14, 2018

Thanks for the pull request.
The PR is not in the form that I am willing to accept because it is changing existing public API.

Considering

  • the availability of 3rd party libraries for parsing uri and
  • that implementation of string parsing function (as shown in this PR) is simple

I do not think we need this as part of grpc library at the moment.

@yang-g yang-g closed this Mar 14, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants