🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cn.bbs.comp.lang.java
Article #23843

Re: Connecting to an NNTP Server...

#23843
From: Matthew Burnside
Date: Thu, 05 Jul 2001 14:54
19 lines
2407 bytes
pehanna@yahoo.com (Phil Hanna) wrote in message news:<3b438ab7.162930952@news.ipass.net>...
> Programming with sockets does not mean working at the byte level.
> That's not how text protocols like NNTP, POP, and SMTP work.  You can
> use telnet to manually interact with a server in full lines of ASCII
> text terminated with CRLF.  A software client is just one simple step
> above that.  After you have opened a socket to the server, you can get
> its input and output streams and wrap them in BufferedReader and
> PrintWriter, respectively, to allow you to use readLine() and
> println() for your interaction.

To the original poster:
This is exactly the combination I have used for the binary
downloader/decoder that I'm writing. It works like a charm. You will
need to read the RFC to get a handle on the protocol. Essentially, you
will send a one-line command and receive either a one-line response or
a multi-line response terminated by a period on a single line. You
will know which to expect based on the command you send.

Feel free to e-mail me if you have questions or problems.
Technical Details
Message-ID: <2e501ccd.0107050654.5a303338@posting.google.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!postnews1.google.com!not-for-mail
References: <Ama07.841$n72.540160@news.uswest.net> <3b438ab7.162930952@news.ipass.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d6b,903b09b806c83a2f
X-Google-Attributes: gid111d6b,public
X-Google-Thread: f6cb0,903b09b806c83a2f
X-Google-Attributes: gidf6cb0,public
X-Google-Thread: 113ae9,903b09b806c83a2f
X-Google-Attributes: gid113ae9,public
X-Google-Thread: f5d71,903b09b806c83a2f
X-Google-Attributes: gidf5d71,public
X-Google-Thread: 10a146,903b09b806c83a2f
X-Google-Attributes: gid10a146,public
X-Google-ArrivalTime: 2001-07-05 07:54:32 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!postnews1.google.com!not-for-mail
From: mattburnside@yahoo.com (Matthew Burnside)
Newsgroups: cn.bbs.comp.lang.java,comp.lang.java,comp.lang.java.help,comp.lang.java.misc,comp.lang.java.programmer
Subject: Re: Connecting to an NNTP Server...
Date: 5 Jul 2001 07:54:31 -0700
Organization: http://groups.google.com/
Lines: 19
Message-ID: <2e501ccd.0107050654.5a303338@posting.google.com>
References: <Ama07.841$n72.540160@news.uswest.net> <3b438ab7.162930952@news.ipass.net>
NNTP-Posting-Host: 12.5.251.194
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 994344872 18204 127.0.0.1 (5 Jul 2001 14:54:32 GMT)
X-Complaints-To: groups-support@google.com
NNTP-Posting-Date: 5 Jul 2001 14:54:32 GMT