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

Could we make it return all the connect info? #627

Open
skyyangyun opened this issue Dec 17, 2023 · 1 comment
Open

Could we make it return all the connect info? #627

skyyangyun opened this issue Dec 17, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@skyyangyun
Copy link

skyyangyun commented Dec 17, 2023

https://github.com/oakserver/oak/blame/aad49081dd7dca6781ec3cfcd7af395fc3884547/http_server_native_request.ts#L80

get remoteAddr(): string | undefined {
    return (this.#conn?.remoteAddr as Deno.NetAddr)?.hostname;
  }

I want know remote connect port. But I find oak just return native request hostname. Can we let it return whole Deno.NetAddr?

@kitsonk kitsonk added the enhancement New feature or request label Dec 17, 2023
@kitsonk
Copy link
Collaborator

kitsonk commented Feb 4, 2024

Ideally you would never need to access the underlying native request. It is an internal abstraction. Other than "it is nice to have" do you have a specific use case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants