Originally posted by Ali Hassaan:
InetAddress address=InetAddress.getByName("hassan");
socket=new Socket(address.getHostAddress (),4444);
Could it be that you have a space after address.getHostAddress and the "()"?
Here is what I've done before with DataGramSockets...
I dont' think you need to have the "address.getHostAddress" either because you've already got the address from InetAdress.
Also, is there anything running to accept connections on port 4444?