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

feat(unstable): add unix domain socket support to Deno.serve #20759

Merged
merged 4 commits into from
Oct 4, 2023

Conversation

kt3k
Copy link
Member

@kt3k kt3k commented Oct 2, 2023

This PR adds unix domain socket support to Deno.serve.

closes #20369

{
signal: ac.signal,
path: filePath,
onListen(info) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I forgot about this in the original description, but we should also be checking that the second argument to this function is a Deno.UnixAddr, ie: https://deno.land/[email protected]?s=Deno.UnixAddr

Copy link
Contributor

@mmastrac mmastrac left a comment

Choose a reason for hiding this comment

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

Looks great. One small comment regarding the second parameter on onListen which should be the address of the incoming connection.

@lino-levan
Copy link
Contributor

I'm thinking that if this lands, I can rework my PR to the std to just deprecate server.ts instead of moving it to unstable. This is the only blocker to doing that afaik.

Copy link
Contributor

@mmastrac mmastrac left a comment

Choose a reason for hiding this comment

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

LGTM!

@kt3k kt3k merged commit da0b945 into denoland:main Oct 4, 2023
13 checks passed
@kt3k kt3k deleted the feat-serve-unix-domain-socket branch October 4, 2023 02:37
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.

Question: Do we have plan to support unix domain socket with Deno.serve?
3 participants