all groups > c# > may 2004 >
You're in the

c#

group:

newsreader



Re: newsreader AlexS
5/31/2004 8:28:48 PM
c#: Hi, pesso

Go ogle for RFCs related to protocols and implement them

Should be simple enough

HTH
Alex

[quoted text, click to view]

newsreader pesso
5/31/2004 11:41:02 PM
How can I write a newsreader in .NET?

Re: newsreader Mike
6/1/2004 2:27:14 AM

Look for the RFC 977 and 2980.
There is also a useful article called "How to NNTP in C#". I can't =
remember where I got it from, but it was easy to find using common =
search engines.

Mike


[quoted text, click to view]
Re: newsreader Arne Janning
6/1/2004 3:36:11 AM
[quoted text, click to view]

Hi pesso,

there is already an implementation of an ADO.NET Data Provider for NNTP
by Dirk_Primbs [MS].

http://workspaces.gotdotnet.com/nntpClient

This library allows you to code like this:

- Simple access using a DataReader:

NntpConnection cn = new NntpConnection("news.microsoft.com");
NntpCommand cmd = new NntpCommand("select top 10 * from
microsoft.public.dotnet.languages.csharp", cn);
cn.Open();
NntpDataReader reader = cmd.ExecuteReader();
while(reader.Read())
Console.WriteLine("{0}\t{1}\n", reader.GetString("From"),
reader.GetString("Subject"));
cn.Close();

- Getting a DataSet:

DataSet ds = new DataSet();

NntpConnection cn = new NntpConnection("news.microsoft.com");
NntpCommand cmd = new NntpCommand("select top 10 * from
microsoft.public.dotnet.languages.csharp", cn);

NntpDataAdapter da = new NntpDataAdapter(cmd);
da.Fill(ds);

It is also possible to post a message:

NntpPosting:
NntpConnection cn = new NntpConnection("news.microsoft.com");
cn.Open();
NntpPosting p = new NntpPosting("Arne Janning",
"spam.me-here.arnolo@msn.com", "Re: fourtytwo", "This is a test.",
"microsoft.test");
p.Post(cn);
cn.Close();

If you use the DataAdapter, just call the Update()-Method.

Cheers

Arne Janning



Re: newsreader Joerg Jooss
6/5/2004 12:34:25 PM
[quoted text, click to view]

Practically everything can be written using .NET ;-)

http://gon.sourceforge.net/

Cheers,

--
Joerg Jooss
AddThis Social Bookmark Button