How easy is it to interface with the network using c++.

I want to send and receive data from two independat programs both that can be written in c++ where they are linked by the data that is being sent.

I want to be able to communicate over LAN's as well as the internet and prehaps set up a server / client applications which allows data transfer. This software ideally needs to be portable between platforms.

Thanks

Simon