Expose api on Stack and add doc

Make it work with smoltcp 0.9
This commit is contained in:
Ulf Lilleengen
2023-02-10 18:20:50 +01:00
parent cd440a49d6
commit 7ae47cb1d8
2 changed files with 5 additions and 10 deletions

View File

@ -231,12 +231,9 @@ impl<D: Driver + 'static> Stack<D> {
unreachable!()
}
/// Make a query for a given name and return the corresponding IP addresses.
#[cfg(feature = "dns")]
async fn dns_query(
&self,
name: &str,
qtype: dns::DnsQueryType,
) -> Result<Vec<IpAddress, { dns::MAX_ADDRESS_COUNT }>, dns::Error> {
pub async fn dns_query(&self, name: &str, qtype: dns::DnsQueryType) -> Result<Vec<IpAddress, 1>, dns::Error> {
let query = self.with_mut(|s, i| {
if let Some(dns_handle) = i.dns_socket {
let socket = s.sockets.get_mut::<dns::Socket>(dns_handle);