Click here to Skip to main content
15,914,016 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everyone,

I am developing a p2p application using socket and i want to connect the remote computer behind the router.

>> Is port forwarding the only way to solve this problem ?
>> If so then how to detect dynamically needs of port forwarding /mapping ?
>> How to Implement it ?


thanks..
Please help..
Posted
Updated 2-Feb-11 19:31pm
v2

Port forwarding is the only way I know of doing this. I don't know if you can detect it dynamically. Port forwarding is accomplished by configuring your router:

http://en.wikipedia.org/wiki/Port_forwarding[^]

http://portforward.com/[^]
 
Share this answer
 
Typically, port forwarding is handled at the firewall - NOT in your application. You can't rely on people running a software firewall, and even if they did, you can't guarantee it will be the one that your program supports. Beyond that, I would consider it a HUGE security violation - and would be downright pissed off - if an application changed my firewall settings on its own.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900