• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

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

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
I knew I would regret that burrito. But this tiny ad has never caused regrets:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic