Affordable web design - Listing New Articles When a newsreader first connects
Friday, December 14th, 2007Listing New Articles When a newsreader first connects to a new server and the user chooses a newsgroup to browse, the newsreader will want to retrieve a list of new articles, those posted or received since the last login by the user. The newnews command is used for this purpose. Three mandatory arguments must be supplied: the name of the group or groups to query, the start date, and the start time from which to list. The date and time are each specified as six- digit numbers, with the most significant information first; yymmdd and hhmmss, respectively: newnews junk 990101 000000 230 New news follows <7g2o5r$aa$6@news.vbrew.com> <7g5bhm$8f$2@news.vbrew.com> <7g5bk5$8f$3@news.vbrew.com> . Selecting a Group on Which to Operate When the user selects a newsgroup to browse, the newsreader may tell the news server that the group was selected. This simplifies the interaction between newsreader and news server; it removes the need to constantly send the name of the newsgroup with each command. The group command simply takes the name of the selected group as an argument. Many following commands use the group selected as the default, unless another news- group is specified explicitly: group junk 211313 junk The group command returns a message indicating the number of active messages, the low-water mark, the high- water mark, and the name of the group, respectively. Note that while the number of active messages and the high-water mark are the same in our example, this is not often the case; in an active news server, some articles may have expired or been deleted, lowering the number of active messages but leaving the high-water mark untouched. Listing Articles in a Group To address newsgroup articles, the newsreader must know which article numbers represent active articles. The listgroup command offers a list of the active article numbers in the current group, or an explicit group if the group name is supplied: listgroup junk 211 Article list follows 1 2 3 . Retrieving an Article Header Only The user must have some information about an article before she can know whether she wishes to read it. We mentioned earlier that some commands allow the article header and body to be transferred separately. The head command is used to request that the server transmit just the header of the specified article to the newsreader. If the user doesn’t want to read this article, we haven’t wasted time and network bandwidth transferring a potentially large article body unnecessarily. Articles may be referenced using either their number (from the listgroup command) or their message identifier: head 2 221 2 <7g5bhm$8f$2@news.vbrew.com> head Path: news.vbrew.com!not-for-mail From: terry@richard.geek.org.au Newsgroups: junk Subject: test message number 2 Date: 27 Apr 1999 21:51:50 GMT