You can't. Imagine if both clients are behind a firewall (or even one client). The firewall would refuse any incoming connections. Same goes for proxys. That's why chat programs always have messages go through a server.
Main Topics
Browse All Topicshi
i m doing a chat software which has text chat answering m/c and so on.
i have a unique problem . i have developed my chat application as a p2p application with a central server. the central server will validate the username and password . after this the user will connect to them indepedently with out the server in picture . it connects good for public to public overriding defualt gateway.can u suggest as how to make private and public ip communicate with this setup , or i have to seup a proxy in between them
pls also supplement ur reply with some sample code. i m doing the entire content in vc++
with regards
tameem
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
BTW, that is because proxies are usually set up to reject connections to private IPs. I don't suppose you can ask each client if they want to use your chat program to configure their proxies (which are running on their router or their machine that provides the internet connection sharing, which would be impossible if you're using it at work or school unless you are the admin) to accept incoming connections for private IPs. If this is the way you want to go, then I suppose it will work, but your chat program will have to make both clients aware that of each other's private ip and the fact that they are connecting to proxies which will in turn connect them to the client.
Martin
Business Accounts
Answer for Membership
by: freshairPosted on 2003-08-06 at 16:56:05ID: 9095708
hmmm...since private IP's are not routeable from the outside world, I'd suggest you try a proxy server.