Logo Search packages:      
Sourcecode: pan version File versions

void NNTP::article ( const Quark group,
unsigned long  article_number,
Listener l 
)

Executes an ARTICLE command: "ARTICLE article_number"

If the NNTP's state isn't currently in the right group, a group() command will be called first.

If successful, this will invoke Listener::on_nntp_line() for each line of the article we get back.

Listener::on_nntp_done() will be called whether the command is successful or not. It will only be called once, at the end of the article() command, even if we had to change groups.

Definition at line 364 of file nntp.cc.

References pan::Quark::c_str().

{
   _listener = l;

   if (group != _group)
      _commands.push_back (build_command ("GROUP %s\r\n", group.c_str()));

   _commands.push_back (build_command ("ARTICLE %lu\r\n", article_number));

   write_next_command ();
}


Generated by  Doxygen 1.6.0   Back to index