File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Sockets and Internet Protocols and the fly likes Socket Programming over the Internet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Socket Programming over the Internet" Watch "Socket Programming over the Internet" New topic

Socket Programming over the Internet

Jude Hapuarachchi

Joined: Jun 22, 2012
Posts: 1
I wrote a simple chat program which perfectly runs on the local host. But, when the client tries to connect to the server via the Internet using the public IP and the port-9999, it does not work as it did on LAN.

As many people have suggested, I did Port-Forwarding as shown in the following figure.

After configuring Port-Forwarding this website indicates that port-9999 remains open for the specific public IP (I run the server on on private network). Although the port remains open, the client cannot connect to the server. Then I disabled the Windows firewall and tried the same process. But the problem still persists.

Please can someone tell me how can I solve this problem..?

Thanks in advance
Sorry for my bad English

Here is the code of the Chat application..


I agree. Here's the link:
subject: Socket Programming over the Internet
It's not a secret anymore!