4 ms·
Couldn't you just connect the uploader's POST to the downloader's GET request instead of using websockets?
by robert-boehnke 15y ago
Couldn't you just connect the uploader's POST to the downloader's GET request instead of using websockets?
- firefoxman1 15y agoThis seems to be more of a streaming upload/download. Node just basically pipes along the chunks from the serving peer through the websockets. I'm pretty sure that if you just "connect the uploader's POST to the downloader's GET" then the Node server would have to buffer the entire file from the submitter before sending it to the clients.
- wonderercat 15y ago> I'm pretty sure that if you just "connect the uploader's POST to the downloader's GET" then the Node server would have to buffer the entire file from the submitter before sending it to the clients. Not at all. Use stream.pipe(). I've done it countless times and it works really well.