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

Change TCP Socket's connect to take a SocketAddress struct. #373

Merged
merged 1 commit into from
Feb 14, 2023

Conversation

dom96
Copy link
Collaborator

@dom96 dom96 commented Feb 13, 2023

This is a breaking change to the API, but one that should make it more consistent with other implementations.

Tested upstream.

@kentonv
Copy link
Member

kentonv commented Feb 14, 2023

Do you have links to other implementations that define it this way? IMO this makes the DX worse.

Copy link
Member

@jasnell jasnell left a comment

Choose a reason for hiding this comment

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

I prefer this pattern. It's similar enough to both Node.js and Deno models and allows passing a URL object as the parameter.

@kentonv
Copy link
Member

kentonv commented Feb 14, 2023

Could we support string | SocketAddress?

@jasnell
Copy link
Member

jasnell commented Feb 14, 2023

I'm good with supporting both, yeah.

@dom96
Copy link
Collaborator Author

dom96 commented Feb 14, 2023

Could we support string | SocketAddress?

Good idea, will do.

@dom96 dom96 force-pushed the dominik/change-tcp-connect-arguments branch from 7a63189 to 795a518 Compare February 14, 2023 11:52
@dom96 dom96 force-pushed the dominik/change-tcp-connect-arguments branch from 795a518 to c0ea735 Compare February 14, 2023 12:20
@dom96 dom96 merged commit 93f9514 into main Feb 14, 2023
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.

3 participants