Hacker News new | ask | show | jobs
by wjholden 1331 days ago
Same in Java. For both TCP and UDP, you build a socket and write to that.

Actually, I don't know what happens if the DNS record expires during the connection. I would presume nothing -- that the socket will stay open with the same (possibly now invalid) destination IP until closed.