Any chance some variant of socket library has support for socket.gethostbyaddr?
-
- Posts: 144
- Joined: Mon Jul 25, 2022 9:45 pm
Any chance some variant of socket library has support for socket.gethostbyaddr?
Any chance some variant of socket library has support for socket.gethostbyaddr?
-
- Posts: 144
- Joined: Mon Jul 25, 2022 9:45 pm
Re: Any chance some variant of socket library has support for socket.gethostbyaddr?
Let me ask a different way, would it be something that might be added, feature add to say the MicroPython usocket module?
Re: Any chance some variant of socket library has support for socket.gethostbyaddr?
I doubt it: gethostbyaddr is no longer recommended for general use:
(source: gethostbyname(3) Linux manual page).
MicroPython docs add: "Using getaddrinfo is the most efficient (both in terms of memory and processing power) and portable way to work with addresses.".
What does getaddrinfo not do for you?
Code: Select all
The gethostbyname*(), gethostbyaddr*(), herror(), and hstrerror()
functions are obsolete. Applications should use getaddrinfo(3),
getnameinfo(3), and gai_strerror(3) instead.
MicroPython docs add: "Using getaddrinfo is the most efficient (both in terms of memory and processing power) and portable way to work with addresses.".
What does getaddrinfo not do for you?