summaryrefslogtreecommitdiff
path: root/protocols/ace/RMCast/RMCast_Resend_Worker.cpp
blob: a4acbeff0cdf196bf2051d67adc3974308461694 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//
// $Id$
//

#include "RMCast_Resend_Worker.h"
#include "RMCast_Module.h"

#if !defined (__ACE_INLINE__)
# include "RMCast_Resend_Worker.i"
#endif /* ! __ACE_INLINE__ */

ACE_RCSID(ace, RMCast_Resend_Worker, "$Id$")

int
ACE_RMCast_Resend_Worker::work (ACE_UINT32 const & key,
                                ACE_RMCast::Data const &item)
{
  if (key > this->max_sequence_number_)
    return 0;
  //ACE_DEBUG ((LM_DEBUG,
  //            "RMCast_Resend_Worker::work - message %d resent\n",
  //            key));

  ACE_RMCast::Data data = item;
  int r = this->next_->data (data);
  if (r != 0)
    return r;
  this->n++;

  return 1; // @@ Stop after the first message...
}