Does your code report any useful error messages on failure?
Do you have a firewall?
Are you assuming that message transport is "instantaneous"?
Are you assuming that message transport never fragments messages?
One several code I've tried can be found at http://johnnie.jerrata.com/winsocktutorial/. The error from this code is: "Call to gethostbyaddr()returned error11004!".
Yes I've got firewall, but the program have access. Even with the firewall turned OFF I've got the same problem (: If I set the client on LAN IP or localhost everything is fine, so I can send and receive message without getting any errors. If I ping my external IP everything is fine...
Wrong settings on router...