Logo Search packages:      
Sourcecode: pan version File versions

void NNTP::handshake ( Listener l  ) 

Executes a handshake command.

This is actually an empty string, but the news server will respond to it.

Definition at line 414 of file nntp.cc.

References _username.

  _listener = l;

  // queue up two or three commands:
  // (1) handshake, which is an empty string
  // (2) if we've got a username, offer it to the server.
  // (3) mode reader.  the `group' command is only available after `mode reader'. (#343814)
  _commands.push_back ("");
  if (!_username.empty()) {
    char buf[512];
    snprintf (buf, sizeof(buf), "AUTHINFO USER %s\r\n", _username.c_str());
    _commands.push_back (buf);
  _commands.push_back ("MODE READER\r\n");

  write_next_command ();

Generated by  Doxygen 1.6.0   Back to index