🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #87122

Re: Semi-random thought: websockets

#87122
From: Joshua Cranmer 🐧
Date: Fri, 23 Oct 2015 17:00
21 lines
2140 bytes
On 10/17/2015 2:17 AM, J. Moreno wrote:
> I was browsing yet another lousy forum the other day, and it occurred to me
> that that there's no pure javascript NNTP reader, because such a beast is
> of course impossible--javascript can't get out of it's sandbox...but maybe
> it could.

Well, it's actually fairly easy to write an NNTP client in JS (I've 
actually started on an nntplib JS lib), except for the little fact that 
every JS environment has a completely different API for TCP sockets. 
There is a proposal at <http://www.w3.org/TR/tcp-udp-sockets/>, but 
that's implemented by nobody.

The whiteout.io people implemented Mozilla's older variant of that 
proposal and wrote shims for Node sockets, chrome sockets, and 
WebSockets here: <https://github.com/whiteout-io/tcp-socket>.

-- 
Beware of bugs in the above code; I have only proved it correct, not 
tried it. -- Donald E. Knuth

Technical Details
Message-ID: <n0dp07$mcp$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.(19219).mbox.7z!not-for-mail
References: <20151017031939.880$4B@newsreader.com>

Show Full Headers
Complete Article Headers
Message-ID: <n0dp07$mcp$1@dont-email.me>
Subject: Re: Semi-random thought: websockets
Date: Fri, 23 Oct 2015 12:00:51 -0500
From: Joshua Cranmer 🐧 <Pidgeot18@verizon.invalid>
References: <20151017031939.880$4B@newsreader.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.(19219).mbox.7z!not-for-mail
Newsgroups: news.software.nntp
Organization: A noiseless patient Spider
Lines: 19
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 23 Oct 2015 16:58:48 +0000 (UTC)
Injection-Info: mx02.eternal-september.org; posting-host="8cedddb29338592f734c41b16a68fadc";
 logging-data="22937"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/CMdFqgkI8iE059FtpCVgkO1AJ9d1kl4M="
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:42.0) Gecko/20100101
 Thunderbird/42.0
In-Reply-To: <20151017031939.880$4B@newsreader.com>
Cancel-Lock: sha1:ianEcP2SAjrpT1DV6vjr1LGcVbc=
X-Received-Body-CRC: 3645495283
X-Received-Bytes: 2143