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

node:dgram compatibility improvements #16446

Draft
wants to merge 126 commits into
base: main
Choose a base branch
from
Draft

node:dgram compatibility improvements #16446

wants to merge 126 commits into from

Conversation

heimskr
Copy link
Member

@heimskr heimskr commented Jan 16, 2025

What does this PR do?

Improves the dgram module to add features and fix bugs. Adds some tests from Node.js.

  • Documentation or TypeScript types
  • Code changes

How did you verify your code works?

Added tests.

src/cli.zig Outdated Show resolved Hide resolved
@heimskr heimskr mentioned this pull request Jan 17, 2025
9 tasks
};

if (iface_id) |id| {
address_slice[percent] = '\x00';
Copy link
Collaborator

Choose a reason for hiding this comment

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

is there always room in the buffer?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, because percent is always before the end of the buffer

Copy link
Member Author

Choose a reason for hiding this comment

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

This is just to trick inet_pton into thinking the string is shorter than it actually is (specifically, that it doesn't contain %foo at the end).

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