Closed sebastian-j-ibanez closed 2 months ago
This is actually a really short sighted idea. An ENTIRE file would be stored in memory at once.
This will not work with large files that are 1GB+. The best solution is to split up a file into smaller packets.
The current protocol splits a buffer into many different packets, which are then encoded by the
gob
library.The problem is that
gob
already does this. We can send an entire buffer at once and packetization will be handled bygob
.The packet struct can be simplified. All it needs is: