I would like to send data over internet through a desktop application. I know a little bit about sockets. I have transferred the data within the LAN, but now I want to trans
What you want to know depends heavily on many parts of your infrastructure.
If you want to send data to a server that is transparently connected to the internet, it is as easy as connecting to it's IP adress.
If you want to connect to some friend with a broadband connection, things get tricky. You usually have to configure both of your routers (or at least the target one) for NAT.
Familiarize yourself with NAT, and the basics of IP routing. The details you provided are not sufficient to describe exactly what you want to do.