No it is up to the user to decide what he wants to allow past his firewall but if you want your program to configure a firewall/router you could use Microsoft UPnP if the remote firewall/router suports it.
Originally Posted by Da-Nuka
Pretty much yes. One difference is that on a LAN there is going to be a lot less latency then on the ineternet, some programs need to be aware of that. For example:
Originally Posted by DA-Nuka
If you want to receive 1024 bytes of data
This might work fine on a lan because the data can all arive at once but on the inernet it may not, infact it probably wont.
recv(TheSocket, Buffer, 1024, 0);