Hi,

I'm trying to connect to a server using Socket, but the server is not
running - shouldn't an exception be generated? I have:

Socket s = null;
try {
s = new Socket();
s.setSoTimeout(1000);
s.connect(new SocketAddress("xxx.yyy.zzz.www",6000),10000);
}
catch (Exception e)
{
System.err.println(e);
e.printStackTrace();
}

catch statements does not get entered. Furthermore, a call to:

s.isConnected()

returns TRUE. Once I try using the socket, I get some null pointer
exceptions etc, I know the server application is NOT running, so how do
you check if you really connected or not?

I am using java available on FC4...

Thanks
Dhiraj.

Reply via email to