Skip to content

socket: dns: expose MAX_DNS_SERVER_COUNT #962

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

Closed

Conversation

mirkomartn
Copy link

Provide a pub const fn that returns the const MAX_DNS_SERVER_COUNT. This will allow users of the library to guard against triggering a panic by passing a too long slice to Socket::update_servers().

Provide a `pub const fn` that returns the const
`MAX_DNS_SERVER_COUNT`. This will allow users of the
library to guard against triggering a panic by
passing a too long slice to `Socket::update_servers`.
@Dirbaio
Copy link
Member

Dirbaio commented Jul 28, 2024

this is already exposed here https://docs.rs/smoltcp/latest/smoltcp/config/constant.DNS_MAX_SERVER_COUNT.html

@mirkomartn
Copy link
Author

Pardon, didn't look carefully enough!

@mirkomartn mirkomartn closed this Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants