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

# ACE_RMCast_IO_UDP Class Reference

`#include <RMCast_IO_UDP.h>`

Inheritance diagram for ACE_RMCast_IO_UDP

[legend]
Collaboration diagram for ACE_RMCast_IO_UDP:

[legend]
List of all members.

## Public Methods
| ACE_RMCast_IO_UDP (ACE_RMCast_Module_Factory *factory)
| Constructor. More...
| ~ACE_RMCast_IO_UDP (void)
| Destructor.
int | init (const ACE_INET_Addr &mcast_group, const ACE_Addr &local, int protocol_family = PF_INET, int protocol = 0, int reuse_addr = 0)
| Open the internal socket, but only to send multicast data. More...
int | subscribe (const ACE_INET_Addr &mcast_addr, int reuse_addr = 1, const ACE_TCHAR *net_if = 0, int protocol_family = PF_INET, int protocol = 0)
| Join a new multicast group. More...
int | handle_events (ACE_Time_Value *tv = 0)
| Wait for events for the period <tv>. If <tv> is zero it blocks forever.
int | handle_input (ACE_HANDLE h)
| There is data to read, read it and process it.
ACE_HANDLE | get_handle (void) const
| Obtain the handle for the underlying socket.
virtual int | data (ACE_RMCast::Data &)
| Push data through the stack.
virtual int | poll (ACE_RMCast::Poll &)
| Push a polling request through the stack.
virtual int | ack_join (ACE_RMCast::Ack_Join &)
| Push a message to ack a join request through the stack.
virtual int | ack_leave (ACE_RMCast::Ack_Leave &)
| Push a message to ack a leave request through the stack.
virtual int | ack (ACE_RMCast::Ack &)
| Push an ack mesage through the stack.
virtual int | join (ACE_RMCast::Join &)
| Push a join message through the stack.
virtual int | leave (ACE_RMCast::Leave &)
| Push a leave message through the stack.
int | send_data (ACE_RMCast::Data &, const ACE_INET_Addr &)
| Send the message to the ACE_INET_Addr argument. More...
int | send_poll (ACE_RMCast::Poll &, const ACE_INET_Addr &)
int | send_ack_join (ACE_RMCast::Ack_Join &, const ACE_INET_Addr &)
int | send_ack_leave (ACE_RMCast::Ack_Leave &, const ACE_INET_Addr &)
int | send_ack (ACE_RMCast::Ack &, const ACE_INET_Addr &)
int | send_join (ACE_RMCast::Join &, const ACE_INET_Addr &)
int | send_leave (ACE_RMCast::Leave &, const ACE_INET_Addr &)
## Private Types
typedef ACE_Hash_Map_Manager< ACE_INET_Addr,ACE_RMCast_UDP_Proxy*, ACE_Null_Mutex> | Map
| Use a Hash_Map to maintain the collection of proxies.
## Private Methods
ACE_RMCast_UDP_Proxy* | allocate_and_bind_proxy (ACE_RMCast_Module *module, const ACE_INET_Addr &)
## Private Attributes
ACE_RMCast_Module_Factory* | factory_
| The factory used to create the modules attached to each proxy.
ACE_INET_Addr | mcast_group_
| The multicast group we subscribe and send to.
ACE_SOCK_Dgram_Mcast | dgram_
| The socket used to receive and send data.
Map | map_
| The collection of proxies.

## Member Typedef Documentation

typedef ACE_Hash_Map_Manager<ACE_INET_Addr,ACE_RMCast_UDP_Proxy*,ACE_Null_Mutex> ACE_RMCast_IO_UDP::Map`[private]`

| Use a Hash_Map to maintain the collection of proxies.

## Constructor & Destructor Documentation

ACE_INLINE ACE_RMCast_IO_UDP::ACE_RMCast_IO_UDP ( | ACE_RMCast_Module_Factory * factory )

| Constructor. The <factory> argument is used to create the modules for each proxy that process incoming messages. The class does *not* assume ownership of <factory>, the caller owns it. But it does assume ownership of the modules returned by the factory, and it may ask the factory to release them eventually.

ACE_RMCast_IO_UDP::~ACE_RMCast_IO_UDP ( | void )`[inline]`

| Destructor.

## Member Function Documentation

int ACE_RMCast_IO_UDP::ack ( | ACE_RMCast::Ack & ack )`[virtual]`

| Push an ack mesage through the stack. Reimplemented from ACE_RMCast_Module.

int ACE_RMCast_IO_UDP::ack_join ( | ACE_RMCast::Ack_Join & ack_join )`[virtual]`

| Push a message to ack a join request through the stack. Reimplemented from ACE_RMCast_Module.

int ACE_RMCast_IO_UDP::ack_leave ( | ACE_RMCast::Ack_Leave & ack_leave )`[virtual]`

| Push a message to ack a leave request through the stack. Reimplemented from ACE_RMCast_Module.

ACE_INLINE ACE_RMCast_UDP_Proxy * ACE_RMCast_IO_UDP::allocate_and_bind_proxy ( | ACE_RMCast_Module * module,
| const ACE_INET_Addr & from_address )`[private]`

int ACE_RMCast_IO_UDP::data ( | ACE_RMCast::Data & data )`[virtual]`

| Push data through the stack. Reimplemented from ACE_RMCast_Module.

ACE_HANDLE ACE_RMCast_IO_UDP::get_handle ( | void ) const

| Obtain the handle for the underlying socket.

int ACE_RMCast_IO_UDP::handle_events ( | ACE_Time_Value * tv = 0 )

| Wait for events for the period <tv>. If <tv> is zero it blocks forever.

int ACE_RMCast_IO_UDP::handle_input ( | ACE_HANDLE h )

| There is data to read, read it and process it.

int ACE_RMCast_IO_UDP::init ( | const ACE_INET_Addr & mcast_group,
| const ACE_Addr & local,
| int protocol_family = PF_INET,
| int protocol = 0,
| int reuse_addr = 0 )

| Open the internal socket, but only to send multicast data. It is not clear to me if this is a valid configuration. Maybe it would be a problem to expose two separate, incompatible interfaces (check the subscribe() method). However, the alternative would be to implement almost identical class for outgoing and incoming UDP I/O

int ACE_RMCast_IO_UDP::join ( | ACE_RMCast::Join & join )`[virtual]`

| Push a join message through the stack. Reimplemented from ACE_RMCast_Module.

int ACE_RMCast_IO_UDP::leave ( | ACE_RMCast::Leave & leave )`[virtual]`

| Push a leave message through the stack. Reimplemented from ACE_RMCast_Module.

int ACE_RMCast_IO_UDP::poll ( | ACE_RMCast::Poll & poll )`[virtual]`

| Push a polling request through the stack. Reimplemented from ACE_RMCast_Module.

int ACE_RMCast_IO_UDP::send_ack ( | ACE_RMCast::Ack & ack,
| const ACE_INET_Addr & to )

int ACE_RMCast_IO_UDP::send_ack_join ( | ACE_RMCast::Ack_Join & ack_join,
| const ACE_INET_Addr & to )

int ACE_RMCast_IO_UDP::send_ack_leave ( | ACE_RMCast::Ack_Leave &,
| const ACE_INET_Addr & to )

int ACE_RMCast_IO_UDP::send_data ( | ACE_RMCast::Data & data,
| const ACE_INET_Addr & to )

| Send the message to the ACE_INET_Addr argument. These methods are used in the implementation of the ACE_RMCast_UDP_Proxy objects and the implementation of the inherited ACE_RMCast_Module methods in this class.

int ACE_RMCast_IO_UDP::send_join ( | ACE_RMCast::Join &,
| const ACE_INET_Addr & to )

int ACE_RMCast_IO_UDP::send_leave ( | ACE_RMCast::Leave &,
| const ACE_INET_Addr & to )

int ACE_RMCast_IO_UDP::send_poll ( | ACE_RMCast::Poll &,
| const ACE_INET_Addr & to )

int ACE_RMCast_IO_UDP::subscribe ( | const ACE_INET_Addr & mcast_addr,
| int reuse_addr = 1,
| const ACE_TCHAR * net_if = 0,
| int protocol_family = PF_INET,
| int protocol = 0 )

| Join a new multicast group. Start receiving data for the <mcast_addr> multicast group. Please read the documentation of ACE_SOCK_Dgram_Mcast for more details.

## Member Data Documentation

ACE_SOCK_Dgram_Mcast ACE_RMCast_IO_UDP::dgram_`[private]`

| The socket used to receive and send data.

ACE_RMCast_Module_Factory * ACE_RMCast_IO_UDP::factory_`[private]`

| The factory used to create the modules attached to each proxy.

Map ACE_RMCast_IO_UDP::map_`[private]`

| The collection of proxies.

ACE_INET_Addr ACE_RMCast_IO_UDP::mcast_group_`[private]`

| The multicast group we subscribe and send to.

The documentation for this class was generated from the following files:

- RMCast_IO_UDP.h
- RMCast_IO_UDP.cpp
- RMCast_IO_UDP.i