سؤال

What would be the "lo" interface equivalent when programming on a windows platform.

for instance when i want to use the following line:

NetworkInterface interf = NetworkInterface.getByName("lo");

or

NetworkInterface interf = NetworkInterface.getByName("eth1");

what would be its equivalent on windows

هل كانت مفيدة؟

المحلول

I'd use loopback or localhost, but the answer greatly depends on context. The reason I suggest these names is because they are present in C:\Windows\System32\drivers\etc\networks and C:\Windows\System32\drivers\etc\hosts respectively.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top