Don't bind to a specific address, unless you have advanced needs (such as creating a host-only service that is not reachable from the local area network). Use INADDR_ANY or the equivalent in your networking API.
I didnt know you could bind without a specific address o.o
In the book Network Programming For MS Windows it says:
"Once the socket of a particular protocol is created, you must bind it to a well-known address. The bind function associates the given socket with a well-known address"
Damn books..(but I really like this one)
On msdn, thou:
"If an application does not care what local address is assigned, specify the constant value INADDR_ANY for an IPv4 local address or the constant value in6addr_any for an IPv6 local address in the sa_data member of the name parameter. This allows the underlying service provider to use any appropriate network address, potentially simplifying application programming in the presence of multihomed hosts (that is, hosts that have more than one network interface and address)."
So, I can bind using INADDR_ANY, and rest assured that if I give to my friend my external address (found on google, whatever) its gonna work ?(consider I have the port used forwarded on the router, thats how my app worked)
Despite the name, most peer to peer modes do rely on a central server for discovery and punch through.
Despite that, is this the purpose of the Hamachi software or am I mistaked again?
Any inputs about solutions that dont require a server (a more "home" approach) to p2p software? uTorrent uses the upnp (universal plug and play) thing to open ports on the router automatically (witch is much better than asking your friend to do porting forward on his router and test your app, witch makes him block you on the msn forever), if the one supports it. Stuff like that.