• Post Reply Bookmark Topic Watch Topic
  • New Topic

Client doesn't get output when local address is replaced by server address

 
Chandrahas Tore
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Client doesn't get output when local address is replaced by server address and client is run from other machine.

Below code works fine when Client and Server are running on same machine but when client runs from other machine with Server's IP address, Client doesn't get any output.

TestClient.java



TestServer.java



Can someone reply where it's going wrong?

Thanks in Advance
- Chandrahas
 
him jain
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The code is fine.
The only problem is with IP : "127.0.0.1"
When you run it on the other machine you need to change it, means you have to give here the IP of server whom you are calling.
That's the only chance of error!!

One more error is possible is of port:
if your port is already in use.
So, better check if that port is free or not.

Let me know what error you are actually getting?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!