Hacker News new | ask | show | jobs
by firefoxman1 5261 days ago
This 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.

1 comments

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