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

fsthttp, internal: add get_addr_dest_ip/port hostcalls #139

Merged
merged 2 commits into from
Sep 9, 2024

Conversation

dgryski
Copy link
Member

@dgryski dgryski commented Sep 4, 2024

Fixes #121

@dgryski
Copy link
Member Author

dgryski commented Sep 4, 2024

Not sure I like how these hostcalls are exposed, but the hostcalls themselves work.

@ydnar
Copy link

ydnar commented Sep 5, 2024

Can you add a RemoteAddr() method to return a net.Addr instead of exposing host and port as fields on Response?

@cee-dub
Copy link
Collaborator

cee-dub commented Sep 5, 2024

Agree with other comments that this should be a method to return a friendly standard Go type.

@joeshaw
Copy link
Member

joeshaw commented Sep 5, 2024

Consider exposing this as a net/netip.AddrPort instead of or in addition to a net.Addr

@dgryski dgryski marked this pull request as ready for review September 5, 2024 23:57
@dgryski
Copy link
Member Author

dgryski commented Sep 6, 2024

API fixed. PTAL.

Copy link
Collaborator

@cee-dub cee-dub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dgryski dgryski merged commit 8c029b5 into main Sep 9, 2024
11 checks passed
@dgryski dgryski deleted the dgryski/origin-addr-port branch September 9, 2024 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement two hostcalls for obtaining address/port used to connect to origin
4 participants