Abhinav Saxena
Abhinav Saxena

Reputation: 2044

Java SE find the adjacent PCs or Devices on the network

  1. I have seen applications that can detect adjacent networks and desktops and devices attached to them. They can also know the computer/device name that is attached within 30 seconds.

  2. Shall I try runtime.execute ping and net view command to do it, for I find them fast. How can I capture the output as a result from these commands?

I tried sockets but they are time consuming.. only advantage, that I can also know that they have application installed (in which I created socket, enabling this communication).

Regards

Upvotes: 0

Views: 143

Answers (1)

Abhinav Saxena
Abhinav Saxena

Reputation: 2044

Time-Outs in the initialization of Socket are useful, but you cannot have each connection connected within less than 300 Milli-seconds. On the server side also there is a timeout implementation. There is one sided communication in both. Multi-threading will help.

Upvotes: 1

Related Questions