if (bob != null) {
do something
}
The second bit probably involves a while loop and an incremented port number variable until its connected or you reach the limit of the ports you want to scan but i'm not sure of the details about sockets in java. Should be easy once you know how to use a socket class though.
__________________
There are only two industries that refer to their customers as "users". - Edward Tufte
|