I was trying to make a p2p app and wanted to know how to loaded part of a file into a buffer then send it, since u cant send it all at once. like make packets.
This is a discussion on More I/O help within the C++ Programming forums, part of the General Programming Boards category; I was trying to make a p2p app and wanted to know how to loaded part of a file into ...
I was trying to make a p2p app and wanted to know how to loaded part of a file into a buffer then send it, since u cant send it all at once. like make packets.
If you want to limit the size of a single transmission, just read the number of bytes you want, send, and continue in a loop until you've read and transmitted all of the file. It's quite straightforward.