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.
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.