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

[multicast_dns] Refactor mDns to Include Cache Consumption Option #8479

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

lusca0x01
Copy link

@lusca0x01 lusca0x01 commented Jan 22, 2025

This PR refactors the multicast DNS (mDns) implementation to introduce a configurable option for controlling cache consumption during lookup operations.

Example Code:

final MDnsClient _client = MDnsClient(
  rawDatagramSocketFactory: (dynamic host, int port, 
      {bool reuseAddress = true, bool reusePort = false, int ttl = 255}) {
    return RawDatagramSocket.bind(
      host, 
      port, 
      reuseAddress: reuseAddress, 
      reusePort: false, 
      ttl: ttl,
    );
  },
  cache: false,
);

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] page, which explains my responsibilities.
  • I read and followed the [relevant style guides] and ran the auto-formatter.
  • I signed the [CLA].
  • The title of the PR starts with the name of the package surrounded by square brackets, e.g., [shared_preferences].
  • [?] I [linked to at least one issue that this PR fixes] in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes].
  • I updated CHANGELOG.md to add a description of the change.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • All existing and new tests are passing.

@lusca0x01 lusca0x01 requested a review from jmagman as a code owner January 22, 2025 15:48
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

Copy link

google-cla bot commented Jan 22, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@lusca0x01 lusca0x01 marked this pull request as draft January 22, 2025 16:02
@lusca0x01 lusca0x01 marked this pull request as ready for review January 22, 2025 16:22
@stuartmorgan
Copy link
Contributor

Thanks for the contribution!

The missing entries in the PR checklist will need to be completed before this can be fully reviewed. Also, you'll want to take a look at the CI failures and address the issues they have identified.

@lusca0x01 lusca0x01 marked this pull request as draft January 22, 2025 22:47
@lusca0x01
Copy link
Author

lusca0x01 commented Jan 23, 2025

Thanks for the contribution!

The missing entries in the PR checklist will need to be completed before this can be fully reviewed. Also, you'll want to take a look at the CI failures and address the issues they have identified.

Hi Stuart,

I couldn’t find an issue that addresses this refactor. How should I proceed with the checklist?

Also, I encountered an issue with the CI following test:
0.3.2+7 -> 0.3.2+8
It states that when bumping the version for release, the NEXT section should be incorporated into the new version's release notes.

Could you guide me on how to resolve this?

Thank you!

@lusca0x01 lusca0x01 marked this pull request as ready for review January 23, 2025 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants