aspose file tools*
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


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Socket Programming over the Internet" Watch "Socket Programming over the Internet" New topic
Author

Socket Programming over the Internet

Jude Hapuarachchi
Greenhorn

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 192.168.1.100 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..

Server:


Client:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Socket Programming over the Internet