DatagramSocket.connect
Hi,
I am trying to find whether a server is running on the remote machine on a specified port.
When the remote server is unreachable, the DatagramSocket.connect(InetAddress, int) always returns without even throwing exception. Even the method DatagramSocket.isConnected also returns true.
socket.connect(hostname, port);
if(!this.socket.isConnected()) {
throw new Exception("Could not connect to Remote server !");
}
socket.send gives me an "ICMP Port Unreachable" exception
Is this how DatagramSocket.connect behaves ?
How can I find whether any valid server is running a remote machine using DatagramSocket ? Is it possible ?

