You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After having read the documentation I still have some doubts.
When does lookup_addr() exactly return an Err? Has this function some kind of timeout?
I would like to use this function in a real time application and I'm wondering if it'd be better to launch this function on a separate thread waiting for its result, since DNS lookups can take up to some hundreds of milliseconds.
The text was updated successfully, but these errors were encountered:
This library is essentially a Rust wrapper for getnameinfo and gethostinfo. These functions are usually defined in the libc for your platform (like gnulibc, microsoft's libc, a BSD libc, etc). So you need to check the documentation for your platform's libc to get the exact behaviour around timing. AFAIK there is no guarantee on how long these functions can take.
If you're looking up reverse dns for something like logging, it might be worth having another thread that can do that logging and the respective reverse dns lookups.
Feel free to ask more questions, but I'm going to close this issue since it's upto the libc library to determine the delay.
After having read the documentation I still have some doubts.
When does
lookup_addr()
exactly return anErr
? Has this function some kind of timeout?I would like to use this function in a real time application and I'm wondering if it'd be better to launch this function on a separate thread waiting for its result, since DNS lookups can take up to some hundreds of milliseconds.
The text was updated successfully, but these errors were encountered: