Re:Show HN: DirtyShare, Pure JavaScript P2P File Sharing (in...
by robert-boehnke on Monday January 16, 2012 @04:04PM
(#3472413)
Couldn't you just connect the uploader's POST to the downloader's GET request instead of using websockets?
[ Parent
| on HN ]
Re:Show HN: DirtyShare, Pure JavaScript P2P File Sharing (in...
by firefoxman1 on Monday January 16, 2012 @04:31PM
(#3472519)
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.
Re:Show HN: DirtyShare, Pure JavaScript P2P File Sharing (in...
by wonderercat on Monday January 16, 2012 @04:48PM
(#3472573)
> 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.