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
Socket is enough if no firewalls/proxies are involved.
But, as Internet is involved (not the fastest connection), I suggest for the sake of convenience you should better opt for remoting over http. That way, even if in the future the setup changes, and firewalls/proxies get involved in the equation, you should not worry.
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.