[Project_owners] Tutorial on NNTP access in XUL

Didier Ernotte didier at ernotte.com
Fri Jan 6 05:44:53 EST 2006


Ok, I've found my problem; The NNTP protocol expect to have a explicit
CR-LF at the end of the command line, not a single CR.
It seems correct now if I add "\r\n".

Didier


--- Didier Ernotte <didier at ernotte.com> wrote:

> Ok, it seems like these object are not implemented in Firefox, only
> in
> Thunderbird... :-( So I'm not gonna use them... But I have to
> reimplement a NNTP protocol by hand based on the socket. I have
> looked
> at the jslib project to play with the socket, but I have a problem.
> My
> script is
> 
> var socket = new Socket();
> socket.open("news.videotron.ca",119);
> socket.async(myObserver);
> 
> when I get the welcome string form the server in the myObserver, I
> call
> 
> 
> socket.write("GROUP netscape.mozilla.dev.xul\n");
> socket.async(myObserver);
> 
> to get the number of news in the newsgroup, but I never get an
> answer.
> The only answer from the news server is a "503 time out" message
> after
> few minutes. 
> Can we make a scenario like 
> OPEN SOCKET
> READ
> WRITE
> READ
> WRITE
> ....
> CLOSE
> 
> It look like after one read and one write, the inputStreamBuffer and
> outputStreamBuffer are stuck. Do we have to reset them ?
> How can I do this scenario ?
> 
> Didier 
> 
> 
> 
> --- Didier Ernotte <didier at ernotte.com> wrote:
> 
> > Hi ,
> > 
> > I'm looking for a small tutorial on how to use the XPCOM objet to
> > acces
> > a NNTP server. I have notive that there is a nsINntpIncomingServer,
> > associated with a nsIMgsFolder, but a small tutorial or a few
> sample
> > lines would be appreciated (when I say "few lines", I mean not
> > reverse
> > engeneering Thunderbird...)
> > Thanks
> > 
> > Didier
> > _______________________________________________
> > Project_owners mailing list
> > Project_owners at mozdev.org
> > http://mozdev.org/mailman/listinfo/project_owners
> > 
> 
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> http://mozdev.org/mailman/listinfo/project_owners
> 



More information about the Project_owners mailing list