예제 #1
0
bool
ReliableSession::control_received(char submessage_id,
                                  const Message_Block_Ptr& control)
{
  if (MulticastSession::control_received(submessage_id, control)) {
    return true; // base class handled message
  }

  switch (submessage_id) {
  case MULTICAST_NAK:
    nak_received(control);
    break;

  case MULTICAST_NAKACK:
    nakack_received(control);
    break;

  default:
    ACE_ERROR((LM_WARNING,
               ACE_TEXT("(%P|%t) WARNING: ")
               ACE_TEXT("ReliableSession::control_received: ")
               ACE_TEXT("unknown TRANSPORT_CONTROL submessage: 0x%x!\n"),
               submessage_id));
    break;
  }
  return true;
}
예제 #2
0
void
ReliableSession::control_received(char submessage_id,
                                  ACE_Message_Block* control)
{
  // Record that we've gotten this message so we don't nak for it later.
  if (!this->acked_) {
    const TransportHeader& header = this->link_->receive_strategy()->received_header();
    if (this->remote_peer_ == header.source_) {
      check_header(header);
    }
  }

  switch(submessage_id) {
    case MULTICAST_SYN:
      syn_received(control);
      break;

    case MULTICAST_SYNACK:
      synack_received(control);
      break;

    case MULTICAST_NAK:
      nak_received(control);
      break;

    case MULTICAST_NAKACK:
      nakack_received(control);
      break;

    default:
      ACE_ERROR((LM_WARNING,
                 ACE_TEXT("(%P|%t) WARNING: ")
                 ACE_TEXT("ReliableSession::control_received: ")
                 ACE_TEXT("unknown TRANSPORT_CONTROL submessage: 0x%x!\n"),
                 submessage_id));
    }
}