Punit Jain wrote:
The first problem i m getting is, i am able to connect to my network only (i mean able to communicate with those machines which are in my network/same network), how do i connect to others networks??
If the host you're connecting to isn't on your LAN, then either it has to have a public IP address, or it has to be behind a router that has a public IP address and that is doing port-forwarding to that host.
Private Network
Port Forwarding
Note that the normal way to run a chat application isn't to have all the participants directly connect to each other. Rather, they all connect to a central server that
does have a public IP address, and that server acts as a relay for the messages.