Looking for a good NNTP library

T

Timothy Roberts

Hey comp.lang.c++, I have tried searching for a working, maintained
NNTP library with good support for binary downloads, but to no avail.
Could you please point me in the direction of one, or perhaps show me
an example of how to communicate with an NNTP server by hand? Thanks
much.
 
T

Tech07

Timothy said:
Hey comp.lang.c++, I have tried searching for a working, maintained
NNTP library with good support for binary downloads, but to no avail.
Could you please point me in the direction of one, or perhaps show me
an example of how to communicate with an NNTP server by hand? Thanks
much.

The source code for Gravity may be what you are looking for.
 
J

James Kanze

There is no such thing as "binary downloads" in NNTP. At
least, the last tiem I checked NNTP was about on the same
dumbness level as POP3:

Not dumbness, but layering. NNTP isn't concerned with
presentation.

Also, the last time I checked, NNTP was pure text, so any binary
had to be base64 encoded, or something similar. Formally, at
least. Even then, most transport was "8 bit clean", and since
NNTP doesn't actually look at the contents, you could
effectively slip binary in. But the protocol at the time
required text, and IIRC, even specified a maximum line length.
(I might add that the last time I checked was a long time ago.)
a single command fetches the raw message. You get the raw
message, and everything else is your problem. If you want to
parse its headers, and chew on its MIME contents, it's your
load to bear, not NNTP's.

Not NNTP's, MIME's. Two different layers. Two different
concerns.
Cone,http://www.courier-mta.org/cone/, includes an NNTP client
in C++. Although the overall design is not the best, the code
is relatively clean. I wouldn't use the same approach that I
did, when I initially implemented it. And, actually, it would
do what you are probably implying by "binary download", but
that has nothing to with NNTP. A higher level set of classes
swallow the raw message, and give you a parsed MIME structure,
and you can than proceed and retrieve the decoded content of
your selected MIME section.

Exactly. Separation of concerns.
 
R

Rui Maciel

Timothy said:
Hey comp.lang.c++, I have tried searching for a working, maintained
NNTP library with good support for binary downloads, but to no avail.
Could you please point me in the direction of one, or perhaps show me
an example of how to communicate with an NNTP server by hand? Thanks
much.

It may not be much help but you can always search for any FLOSS usenet client written in C++ and look at the
source code. The first one that comes to mind is knode. It isn't as helpful as a nice link to a library but
I believe you can benefit from it. Heck, you may even pull a webkit on the usenet client's NNTP code.


Rui Maciel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top