Article View: news.software.readers
Article #195727Re: message threading
From: Zenobiusz Zimny
Date: Sun, 18 Feb 2007 08:20
Date: Sun, 18 Feb 2007 08:20
39 lines
2548 bytes
2548 bytes
"startrak" <riks.patel@gmail.com> wrote in news:1170694294.429417.145350@s48g2000cws.googlegroups.com: > Hello all > > I'm currently developing my own Newsreader client in c++. Good luck :) > So far I've managed to do all the basics of downloading the > newsgroups, headers and the text of the article headers ans so on. Is your code RFC3977 compliant (just curious)? > However, I'm now stuck on completing the message threading aspect > of the client. Yeah, that is the hardest part. > I know the whole process of how the threading works (message id's and > reference id's), but I need an example of how to implement it? > Any ideas? In theory, it should be quite easy - you just get References header and remove all its content apart from last Message-ID, which is the parent of your article. You mentioned that you are writing it in C++, so I asume that you are using OOP as well. Therefore you can store two fields: one would be the M-ID of parent article, second would be dynamic array of all direct responses... There's got to be a method which help you add any followups. While building headers tree, you would iterate through such a table and place their headers in place... Well, at least in theory, this approach should work. But keep in mind, that Message-ID's might be broken (or incomplete). I don't know about memory consumption, but AFAICS my "algorithm" may cause some problems... HTH, Zenon.
Technical Details
Message-ID:
<Xns98DB5F175CF32lameria@193.219.28.145>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!news.nask.pl!news.nask.org.pl!news2.icm.edu.pl!not-for-mailReferences:
<1170694294.429417.145350@s48g2000cws.googlegroups.com>Show Full Headers
Complete Article Headers
Message-ID: <Xns98DB5F175CF32lameria@193.219.28.145> Subject: Re: message threading Date: Sun, 18 Feb 2007 08:20:32 +0000 From: Zenobiusz Zimny <zimnyzenon@hotmail.com> References: <1170694294.429417.145350@s48g2000cws.googlegroups.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!news.nask.pl!news.nask.org.pl!news2.icm.edu.pl!not-for-mail Newsgroups: news.software.readers Supersedes: <Xns98DAE4AC730F3lameria@193.219.28.145> Organization: Vrienden van Nederland Lines: 39 Reply-To: wstaw_tu_subdomene@zimnyzenon.hotmail.com NNTP-Posting-Host: chello087206102106.chello.pl X-Trace: achot.icm.edu.pl 1171786832 27648 87.206.102.106 (18 Feb 2007 X-Complaints-To: abuse@icm.edu.pl NNTP-Posting-Date: Sun, 18 Feb 2007 08:20:32 +0000 (UTC) User-Agent: Xnews/06.08.25