Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

ACE_RMCast_UDP_Reliable_Sender Class Reference

#include <RMCast_UDP_Reliable_Sender.h>

Inheritance diagram for ACE_RMCast_UDP_Reliable_Sender:

Inheritance graph
[legend]
Collaboration diagram for ACE_RMCast_UDP_Reliable_Sender:

Collaboration graph
[legend]
List of all members.

Public Methods

 ACE_RMCast_UDP_Reliable_Sender (ACE_RMCast_Module *user_control)
 Constructor. More...

virtual ~ACE_RMCast_UDP_Reliable_Sender (void)
 Destructor. More...

int init (const ACE_INET_Addr &mcast_group)
 Open the UDP I/O module. More...

void reactive_incoming_messages (ACE_Reactor *reactor)
 Use the reactor to handle incoming messages. More...

void reactive_resends (ACE_Reactor *reactor, const ACE_Time_Value &period)
 Use the reactor to periodically resend messages. More...

int has_data (void)
 Check if there is still some messages to send, return 0 if not. More...

int has_members (void)
 Check if there are any members still connected. More...


Private Attributes

ACE_RMCast_Moduleuser_control_
 The application-level control module. More...

ACE_RMCast_Sequencer sequencer_
 Assign sequence numbers. More...

ACE_RMCast_Retransmission retransmission_
 The retransmission module. More...

ACE_RMCast_Singleton_Factory factory_
 All the proxys give their messages to the retransmission module. More...

ACE_RMCast_IO_UDP io_udp_
 Handle all the UDP I/O. More...

ACE_RMCast_Membership membership_
 The membership module. More...

ACE_RMCast_Fragment fragment_
 The fragmentation module. More...

ACE_RMCast_Fork fork_
 Redirect control messages to the user supplied module. More...


Constructor & Destructor Documentation

ACE_RMCast_UDP_Reliable_Sender::ACE_RMCast_UDP_Reliable_Sender ACE_RMCast_Module   user_control
 

Constructor.

Definition at line 14 of file RMCast_UDP_Reliable_Sender.cpp.

References fork_, fragment_, membership_, ACE_RMCast_Module::next, retransmission_, ACE_RMCast_Fork::secondary, and sequencer_.

00015   : user_control_ (user_control)
00016 
00017   // We use a singleton factory, all proxys send their messages to the
00018   // retransmission module.  There should be only control messages
00019   // coming back, so this is OK.
00020   , factory_ (&membership_)
00021   , io_udp_ (&factory_)
00022 {
00023   // Control messages are received by the membership module and passed
00024   // up to the both the retransmission and user modules, we use a fork
00025   // module to do that
00026   this->membership_.next (&this->fork_);
00027 
00028   this->fork_.next (&this->retransmission_);
00029   this->fork_.secondary (user_control);
00030 
00031   // Messages are passed down to the sequencer module
00032   this->next (&this->sequencer_);
00033 
00034   // then to the retransmission module
00035   this->sequencer_.next (&this->retransmission_);
00036 
00037   // Then fork the messages, at this point control messages are sent
00038   // back to the user, other messages continue down to the
00039   // fragmentation layer.
00040   this->retransmission_.next (&this->fragment_);
00041 
00042   // The fragmentation layer delegates all messages to the UDP I/O
00043   // module, that sends every message back to the application.
00044   this->fragment_.next (&this->io_udp_);
00045 }

ACE_RMCast_UDP_Reliable_Sender::~ACE_RMCast_UDP_Reliable_Sender void    [virtual]
 

Destructor.

Definition at line 47 of file RMCast_UDP_Reliable_Sender.cpp.

00048 {
00049 }


Member Function Documentation

ACE_INLINE int ACE_RMCast_UDP_Reliable_Sender::has_data void   
 

Check if there is still some messages to send, return 0 if not.

Definition at line 10 of file RMCast_UDP_Reliable_Sender.i.

References ACE_RMCast_Retransmission::has_data, and retransmission_.

00011 {
00012   return this->retransmission_.has_data ();
00013 }

ACE_INLINE int ACE_RMCast_UDP_Reliable_Sender::has_members void   
 

Check if there are any members still connected.

Definition at line 16 of file RMCast_UDP_Reliable_Sender.i.

References ACE_RMCast_Membership::has_members, and membership_.

00017 {
00018   return this->membership_.has_members ();
00019 }

ACE_INLINE int ACE_RMCast_UDP_Reliable_Sender::init const ACE_INET_Addr   mcast_group
 

Open the UDP I/O module.

Definition at line 4 of file RMCast_UDP_Reliable_Sender.i.

References ACE_RMCast_IO_UDP::init, io_udp_, and ACE_Addr::sap_any.

00005 {
00006   return this->io_udp_.init (mcast_group, ACE_Addr::sap_any);
00007 }

void ACE_RMCast_UDP_Reliable_Sender::reactive_incoming_messages ACE_Reactor   reactor
 

Use the reactor to handle incoming messages.

Definition at line 52 of file RMCast_UDP_Reliable_Sender.cpp.

References ACE_NEW, ACE_Event_Handler::READ_MASK, and ACE_Reactor::register_handler.

00053 {
00054   ACE_RMCast_UDP_Event_Handler *eh;
00055   ACE_NEW (eh, ACE_RMCast_UDP_Event_Handler (&this->io_udp_));
00056 
00057   /// @@ TODO Make sure it is removed from the Reactor at some point
00058   (void) reactor->register_handler (eh, ACE_Event_Handler::READ_MASK);
00059 }

void ACE_RMCast_UDP_Reliable_Sender::reactive_resends ACE_Reactor   reactor,
const ACE_Time_Value   period
 

Use the reactor to periodically resend messages.

Definition at line 62 of file RMCast_UDP_Reliable_Sender.cpp.

References ACE_NEW, and ACE_Reactor::schedule_timer.

00064 {
00065   ACE_RMCast_Resend_Handler *eh;
00066   ACE_NEW (eh, ACE_RMCast_Resend_Handler (&this->retransmission_));
00067 
00068   /// @@ TODO make sure it is removed from the Reactor at some point
00069   (void) reactor->schedule_timer (eh, 0, period, period);
00070 }


Member Data Documentation

ACE_RMCast_Singleton_Factory ACE_RMCast_UDP_Reliable_Sender::factory_ [private]
 

All the proxys give their messages to the retransmission module.

Definition at line 58 of file RMCast_UDP_Reliable_Sender.h.

ACE_RMCast_Fork ACE_RMCast_UDP_Reliable_Sender::fork_ [private]
 

Redirect control messages to the user supplied module.

Definition at line 70 of file RMCast_UDP_Reliable_Sender.h.

Referenced by ACE_RMCast_UDP_Reliable_Sender.

ACE_RMCast_Fragment ACE_RMCast_UDP_Reliable_Sender::fragment_ [private]
 

The fragmentation module.

Definition at line 67 of file RMCast_UDP_Reliable_Sender.h.

Referenced by ACE_RMCast_UDP_Reliable_Sender.

ACE_RMCast_IO_UDP ACE_RMCast_UDP_Reliable_Sender::io_udp_ [private]
 

Handle all the UDP I/O.

Definition at line 61 of file RMCast_UDP_Reliable_Sender.h.

Referenced by init.

ACE_RMCast_Membership ACE_RMCast_UDP_Reliable_Sender::membership_ [private]
 

The membership module.

Definition at line 64 of file RMCast_UDP_Reliable_Sender.h.

Referenced by ACE_RMCast_UDP_Reliable_Sender, and has_members.

ACE_RMCast_Retransmission ACE_RMCast_UDP_Reliable_Sender::retransmission_ [private]
 

The retransmission module.

Definition at line 55 of file RMCast_UDP_Reliable_Sender.h.

Referenced by ACE_RMCast_UDP_Reliable_Sender, and has_data.

ACE_RMCast_Sequencer ACE_RMCast_UDP_Reliable_Sender::sequencer_ [private]
 

Assign sequence numbers.

Definition at line 52 of file RMCast_UDP_Reliable_Sender.h.

Referenced by ACE_RMCast_UDP_Reliable_Sender.

ACE_RMCast_Module* ACE_RMCast_UDP_Reliable_Sender::user_control_ [private]
 

The application-level control module.

Definition at line 49 of file RMCast_UDP_Reliable_Sender.h.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 13:14:38 2003 for ACE_RMCast by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002