Posted By:
Aliasgar_Pocketwala
Posted On:
Monday, April 16, 2001 08:16 AM
Any ideas why this code does not work I am working on a simple chat applet which needs to connect back to the server. This applet is server from the computer abc.com. Also I need to use the same constructor as shown below, if I use the normal constructor everything works fine, however I need to be able to bind the Socket to a particular internal port. I am also using Internet Explorer as my browser InetAddress add = InetAddress.getByName("abc.com"); Socket s = new Socket(add,5000,InetAddress.getLocalHost(),5000); where abc.com is a valid address and is also the address of the server from where the applet came. When I try to open s it throws a NoRouteToHostException. What am I doing wrong?
More>>
Any ideas why this code does not work
I am working on a simple chat applet which needs to connect back to the server. This applet is server from the computer abc.com. Also I need to use the same constructor as shown below, if I use the normal constructor everything works fine, however I need to be able to bind the Socket to a particular internal port. I am also using Internet Explorer as my browser
InetAddress add = InetAddress.getByName("abc.com");
Socket s = new Socket(add,5000,InetAddress.getLocalHost(),5000);
where abc.com is a valid address and is also the address of the server from where the applet came.
When I try to open s it throws a NoRouteToHostException. What am I doing wrong?
Any help would be welcome
Thanks
Aly.
<<Less