Select any Protocol.
The easiest way http for its maximum popularity.
Use the libraries (client and server) for this Protocol and send the file.
Franz.Waters16 answered on June 26th 19 at 14:04
on the one hand raise a tcp server on the other tcp client need open the file for reading and send data.
Kara.Nader10 answered on June 26th 19 at 14:06
It will be easier if the server does not write on C++, but take, for example, Apache. The client no problem to write such a server, because the client-the implementation of HTTP is in your OS.
Implement HTTP to TCP, as well as the native client-server TCP is not so easy, if it is required reliability, because the Internet regular breaks, and emergency completion of the OS or Your program happen. You need to study TCP.