dachad / tcpgoon

tcpgoon, maximum TCP connections tester
MIT License
193 stars 21 forks source link

Run DNS lookup once and validate it before starting #51

Closed chadell closed 6 years ago

chadell commented 6 years ago
chadell commented 6 years ago

Lookup support IPv4 and IPv6 resolution: https://golang.org/src/net/lookup.go?s=5208:5248#L157

chadell commented 6 years ago

Regarding the static access to the first element of the array addrs[0]. If the resolution has worked well it will be always a first entry. Another way, it could be a random selection in addrs[], but I don't see too much value...

chadell commented 6 years ago

@dcaba have a look at my two comments ;)

dcaba commented 6 years ago

See my commits, as it addresses some of my comments (remember to pull them in your local git repo!). Then only variable naming matters should require a look...