This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Sockets and Internet Protocols and the fly likes Simple Chat Server/Client not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Simple Chat Server/Client not working" Watch "Simple Chat Server/Client not working" New topic
Author

Simple Chat Server/Client not working

Gulshan Singh
Ranch Hand

Joined: Apr 22, 2009
Posts: 41
I made a simple chat server and client that works pretty well in a LAN network. The problem is if I try connecting the client to a remote computer, it doesn't connect. Why is this happening and how do I fix it?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41060
    
  43
Maybe there's a firewall in between that blocks the port you're using?


Ping & DNS - my free Android networking tools app
Gulshan Singh
Ranch Hand

Joined: Apr 22, 2009
Posts: 41
Ulf Dittmer wrote:Maybe there's a firewall in between that blocks the port you're using?


Do both ports on the client and server machines need to be unblocked or just one? Do the ports need to be forwarded?

Also, when I install an app like AIM, I don't need to do any work with ports; I'm guessing it does it for you. Is this right and is there a way to do this in java?
 
wood burning stoves
 
subject: Simple Chat Server/Client not working
 
Similar Threads
Compilation Error
java.net.Connect Exception: Connection refused java.lang.Null Pointer Exception
How must be chat app. with protocols ?
passing parameter from servlet to applet
Putting Frame in HTML Code