I want to transfer fil开发者_如何学JAVAes across the network using C or C++. What topics should I look up? How can I do this?
You should start by choosing a protocol. HTTPS and SFTP are both good choices, but there are obviously others. Once you have that straight, you can look up choices for client and server libraries.
I would recommend looking through documentation of Windows Sockets and boost asio.
While you could use ReadFile
to read the file's contents and then send it over a socket, Windows also provides the TransmitFile
API to enable you to read a file's data and send it over a socket with one system call.
there is sendfile function in C. Just check it out.
精彩评论