How to send files b / w by two machines via socket programming?

I have a requirement to send all files in a directory to other computers, the directory can contain child directories.

Is there any help with this issue?

Another doubt: I've also heard that we can send files using FTP, if so, what's best in between. Is there any help for this?

I need to implement this on Windows platform using vC ++ / C ++

thanks

0


a source to share


3 answers


One of the possibilities is the TransmitFile () function in the Windows API. You will need to navigate directories to find individual files with your own code.



+1


a source


You should probably merge and compress the files / directories at the original end.
Pass and untie at the other end.

A library that helps (free) is bzip ( http://www.bzip.org/ )



You should be able to do everything in memory if you do it well, but you could potentially use intermediate files as well.

0


a source


  • Sounds like a home problem.
  • FTP uses sockets internally.

Make an initial attempt at the problem and post it here. You will get more help if people think you are trying, not just freeloading.

0


a source







All Articles