News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

NMTP commands

Started by Grincheux, March 05, 2005, 04:38:29 PM

Previous topic - Next topic

Grincheux

I am writing a news reader program and encounter many problems.
The which I want to resolve is for selecting a news group.
I send the command "LISTGROUP alt.binaries.amp" this is OK the first time.
If I select an other group with the "LISTGROUP" command, the news server answers "500 What?"
How can I do ?
I propose to send the following commands :

GROUP alt.binaries.amp
LISTGROUP alt.binaries.amp


Is it a good method ?

Thanks

Philippe RIO
Kenavo

Grincheux
_____________________________________________________
http://www.phrio.biz

James Ladd

Have you found the "RFC" for the new protocol ?
Its online at the RFC site. It will define the proper way for selecting a group and listing its contents.
Id check it before trying some other method.

Grincheux

I have read the RFC977 and RFC1036 and RFC2980 docs.

They describe each command not the way to use them.

And the sources examples I have found made the same thing I want to do but with only one news group.
Kenavo

Grincheux
_____________________________________________________
http://www.phrio.biz

Tedd

Off the top of my head...

* To get a list of the current news groups: "LIST"
* To select a newsgroup to read from: "GROUP <group.name>" (eg "GROUP alt.lang.asm")
* To read a specific article in the (current) newsgroup: "ARTICLE <article-id>" (eg "ARTICLE 25179")
* HEAD and BODY act the same as ARTICLE, but return the head and body of the article, respectively; article gives both (HEAD is useful to give a summary listing (author, subject, etc) of the articles in the group, without having to download every article)
* STAT tells which article is currently 'selected' (eg "STAT")
[All commands terminated with a newline.]

If you want to step through all of the articles in the newsgroup, you can use the following:
- when you first select a group, the currently selected article is the oldest
- "ARTICLE" will spill the contents of this article (no id required - it gives the 'current' one unless you give an id)
- "NEXT" moves onto the next available article (id's aren't always sequential, some are missing/removed)
- and you can continue to do ARTICLE and NEXT, until you receive a "no more" message (whatever the error code is)

To select a different newsgroup, you just do another "GROUP .." command. And then do the same again to get its contents.

This should be enough to get you started :U


PS It's NNTP ::)
No snowflake in an avalanche feels responsible.

Grincheux

I think you are right.

What you say is very clear. If the RFC doc were written using your words I would have understood.

Thanks, now I think I have no more problems.
Kenavo

Grincheux
_____________________________________________________
http://www.phrio.biz

Tedd

Yeah, they're written in a certain way. You just have to learn how to read them.

I got most of that from the rfc. And then messed about with it in telnet to understand better.

Good luck :U
No snowflake in an avalanche feels responsible.