#727 net.server uses socket.dns.getaddrinfo which is missing from luasocket 2
What steps will reproduce the problem?
1. Run Prosody 0.10 or trunk with LuaSocket 2.0.2
What is the expected output?
What do you see instead?
Traceback due to missing getaddrinfo()
This was introduced in https://hg.prosody.im/0.10/rev/ffb2b5e31456
- Declare that 0.10 depends on LuaSocket 3
- Revert the commit.
This is further complicated by the IP version agnostic stuff in recent LuaSocket.
socket.tcp() -> ipv4
socket.tcp6() -> ipv6 (if available)
socket.tcp() -> ip agnostic, becomes v4 or v6 after given an address, invalid FD until then
socket.tcp4() and .tcp6() -> v4 or v6 as before
The real solution here is having async DNS support in case you pass a DNS name to server.addclient(), and proper distinguishing of v6 and v4 addresses otherwise.
Let's just say LuaSocket 3.x is needed, everyone should have it already.