This can be done through the operating system's interface that it provides towards the network stack.
On Windows, you use Winsock (aka, Windows Sockets).
On Linux/*nix - you use Unix Sockets.
Establish a protocol that's relatively sane and secure, in network byte order.
Define your TCP/IP (or UDP) structures for the address, bind a server, connect a client.
...
???
Profit.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.