Saturday, November 4, 2006 08:57 PM
I haven't seen CS really, but if you just need ApplicationX running on one computer to detect and talk to ApplicationX on another computer, then you might look into the concept of service discovery. One common way is to use UDP-based broadcast network traffic... effectively the app asks the entire local network "hey, anyone else in here speak AppX protocol?" and the other AppX apps reply back "yeah... I'm on hostname 'bob' at address 192.168.1.55 port 3288".
If you really want to read something cool on this line of thinking, also read up on 'zero configuration networking' of which service discovery is just a little piece. Mac computers have built-in service discovery in many of their apps and there is a pseudo-standard way of doing this. Of course, you can home-brew something that'll work. I just implemented service discovery for a user-level service monitor tool at my work place.
On the other hand, "network scanning" carries a deeper meaning than this... find all TCP, UDP, and ICMP services running on all hosts on the local network. Java does not lend itself to this as it doesn't have raw-level and ICMP-level communication capabilities.