Logo Search packages:      
Sourcecode: kmess version File versions

void P2PApplicationBase::testDataSendingAborted (  )  [protected, inherited]

Test if the contact aborted the sending of data.

This method is intended to be used by the P2PApplication class. When a transfer to the contact is aborted, this method sends a 0x40 message. That control packet terminates the "ack slot" in the remote client.

Definition at line 2236 of file p2papplicationbase.cpp.

References P2PApplicationBase::getUnAckedMessage(), P2PMessage::MSN_FLAG_ABORTED_SENDING, P2PApplicationBase::P2P_MSG_DATA, P2PApplicationBase::P2P_WAIT_FOR_SLP_BYE_ACK, and P2PApplicationBase::sendP2PAckImpl().

Referenced by P2PApplication::gotAck_slpBye().

  KMESS_ASSERT( waitingState_ == P2P_WAIT_FOR_SLP_BYE_ACK );

  // See if the data was not acked.
  UnAckedMessage *unAckedDataMessage = getUnAckedMessage( P2P_MSG_DATA );
  if( unAckedDataMessage != 0 )
    kDebug() << "Sent data was not acked, sending 0x40 to abort ack request.";

    // It's possible WLM also closed it's data stream at this point,
    // so ignores the 0x40 and sends a 0x80 at the same time back.
    sendP2PAckImpl( P2PMessage::MSN_FLAG_ABORTED_SENDING, unAckedDataMessage );

    // Remove from collection
    outgoingMessages_.removeAll( unAckedDataMessage );
    delete unAckedDataMessage;

Generated by  Doxygen 1.6.0   Back to index