Hacker News new | ask | show | jobs
by tptacek 1604 days ago
What do you think an "entire client connection" is? It's a read and a write from a net.Conn. Read client.go's (c *Client) exchange() (the lowercase one). It's 30 lines of code, and that includes stuff like EDNS0, TSIG, and read deadlines that have nothing to do with the functionality the author is demonstrating.

If the author took the time to write a 15 line roundTrip() function that called m.Pack(), udpConn.Write(), udpConn.SetDeadline(1s), and udpConn.Read(), would your argument here evaporate? Then it's not a very good argument, is it?

1 comments

Opening a connection and performing parsing on record formats is the "heavy lifting" in this example.
Yes, we're clear on where the disagreement is between the two of us.