Question

I am reading here, that

On connect, the JVM (Java Virtual Machine) tries to resolve the hostname to IP/port. Windows tries a netbios ns query on UDP (User Datagram Protocol) port 137 with a timeout of 1.5 seconds, ignores any ICMP (Internet Control Message Protocol) port unreachable packets and repeats this two more times, adding up to a value of 4.5 seconds. I suggest putting critical hostnames in your HOSTS file to make sure they are resolved quickly. Another possibility is turning off NETBIOS altogether and running pure TCP/IP on your LAN (Local Area Network).

is this currently an issue still? Because I am working on a heartbeat-sensor and I was curious.

Was it helpful?

Solution

Your citation is not a normative reference, just another hobby site, and in this case it is dead wrong. None of this has anything to do with setSoTimeout(). He is totally confused between name resolution time, connect time, and read time. setSoTimeout() sets a read timeout, and is unaffected by the shenanigans he describes, whether accurately or otherwise, which wouldn't even happen at connect time as he states: they would happen at name-resolution time.

It's far from the only confusion to be found on that site, or even on that page, let me assure you. I told him about several errors on this page ten years ago, and about quite a lot of others, all of which remain uncorrected to this day, which gives you an idea of the site's accuracy, up-to-date-ness, and content review mechanisms. His only response was to add a rude remark about me. Unconvincing as a peer review mechanism.

Stick to authoritative sources.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top