Logo Search packages:      
Sourcecode: kmess version File versions  Download package

int MsnConnection::sendCommand ( const QString &  prefix,
const QString &  text = "\r\n" 
) [protected, inherited]

Send a command to the server.

This function automatically inserts the ACK-number between the prefix and text. This can be used later to track error responses.

Parameters:
prefix The three-letter command, which parseCommand() receives in command[0].
text The command arguments, joined with spaces.
Returns:
The ack-number used by the command.

Definition at line 724 of file msnconnection.cpp.

Referenced by MsnNotificationConnection::changeProperty(), MsnNotificationConnection::changeStatus(), MsnConnection::disconnectFromServer(), MsnNotificationConnection::goOnline(), MsnNotificationConnection::loginSucceeded(), MsnNotificationConnection::putVer(), and slotConnected().

{
  int ack = ack_++;

  // Send the data to the server
  const QString command( prefix + " " + QString::number( ack ) + " " + text +  "\r\n" );
  writeData( command );

  // Return the ack used
  return ack;
}


Generated by  Doxygen 1.6.0   Back to index