According to the docs, the 2nd getaddrinfo argument (servname) is either a decimal port number or a service name listed in /etc/services.
We could add a reduced service name database like this:
services = {
"telnet": 23,
"tftp": 69,
"ntp": 123,
"http": 80,
"https": 443,
"mqtt": 1883,
"mqtts": 8883,
}
It could easily be extended by the developer if needed:
aiodns.services.update({"ftp": 21, "ssh": 22})
Any thoughts?
According to the docs, the 2nd
getaddrinfoargument (servname) is either a decimal port number or a service name listed in/etc/services.We could add a reduced service name database like this:
It could easily be extended by the developer if needed:
Any thoughts?