#include <ECG_Simple_Address_Server.h>
Collaboration diagram for TAO_ECG_Simple_Address_Server:
Public Member Functions | |
virtual | ~TAO_ECG_Simple_Address_Server (void) |
Destructor. | |
int | init (const char *arg) |
virtual void | get_addr (const RtecEventComm::EventHeader &header, RtecUDPAdmin::UDP_Addr_out addr) |
virtual void | get_address (const RtecEventComm::EventHeader &header, RtecUDPAdmin::UDP_Address_out addr6) |
Static Public Member Functions | |
static TAO_EC_Servant_Var< TAO_ECG_Simple_Address_Server > | create (void) |
Protected Member Functions | |
TAO_ECG_Simple_Address_Server (void) | |
Private Attributes | |
ACE_INET_Addr | addr_ |
This simple server always returns multicast address it was initialized with, regardless of the header.
Definition at line 30 of file ECG_Simple_Address_Server.h.
TAO_ECG_Simple_Address_Server::~TAO_ECG_Simple_Address_Server | ( | void | ) | [virtual] |
TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_ECG_Simple_Address_Server::TAO_ECG_Simple_Address_Server | ( | void | ) | [protected] |
Constructor (protected). Clients can create new TAO_ECG_Simple_Address_Server objects using the static create() method.
Definition at line 11 of file ECG_Simple_Address_Server.cpp.
static TAO_EC_Servant_Var<TAO_ECG_Simple_Address_Server> TAO_ECG_Simple_Address_Server::create | ( | void | ) | [static] |
Create a new TAO_ECG_Simple_Address_Server object. (Constructor access is restricted to insure that all TAO_ECG_Simple_Address_Server objects are heap-allocated.)
Referenced by TAO_ECG_Mcast_Gateway::init_address_server().
void TAO_ECG_Simple_Address_Server::get_addr | ( | const RtecEventComm::EventHeader & | header, | |
RtecUDPAdmin::UDP_Addr_out | addr | |||
) | [virtual] |
Definition at line 26 of file ECG_Simple_Address_Server.cpp.
References addr_, CORBA::COMPLETED_YES, ACE_INET_Addr::get_ip_address(), and ACE_INET_Addr::get_port_number().
00029 { 00030 #if defined (ACE_HAS_IPV6) 00031 if (this->addr_.get_type() == PF_INET6) 00032 throw CORBA::DATA_CONVERSION(0, CORBA::COMPLETED_YES); 00033 #endif /* ACE_HAS_IPV6 */ 00034 // unsigned long 00035 addr.ipaddr = this->addr_.get_ip_address (); 00036 // unsigned short 00037 addr.port = this->addr_.get_port_number (); 00038 }
void TAO_ECG_Simple_Address_Server::get_address | ( | const RtecEventComm::EventHeader & | header, | |
RtecUDPAdmin::UDP_Address_out | addr6 | |||
) | [virtual] |
Definition at line 42 of file ECG_Simple_Address_Server.cpp.
References addr_, ACE_INET_Addr::get_addr(), ACE_INET_Addr::get_ip_address(), ACE_INET_Addr::get_port_number(), RtecUDPAdmin::UDP_Addr::ipaddr, ACE_OS::memcpy(), and RtecUDPAdmin::UDP_Addr::port.
00044 { 00045 #if defined (ACE_HAS_IPV6) 00046 if (this->addr_.get_type() == PF_INET6) 00047 { 00048 RtecUDPAdmin::UDP_Addr_v6 v6; 00049 sockaddr_in6 *in6 = 00050 reinterpret_cast<sockaddr_in6 *>(this->addr_.get_addr()); 00051 ACE_OS::memcpy (v6.ipaddr,&in6->sin6_addr,16); 00052 v6.port = this->addr_.get_port_number(); 00053 addr.v6_addr (v6); 00054 return; 00055 } 00056 #endif /* ACE_HAS_IPV6 */ 00057 RtecUDPAdmin::UDP_Addr v4; 00058 v4.ipaddr = this->addr_.get_ip_address(); 00059 v4.port = this->addr_.get_port_number(); 00060 addr.v4_addr (v4); 00061 }
int TAO_ECG_Simple_Address_Server::init | ( | const char * | arg | ) |
Definition at line 20 of file ECG_Simple_Address_Server.cpp.
References addr_, and ACE_INET_Addr::set().
Definition at line 59 of file ECG_Simple_Address_Server.h.
Referenced by get_addr(), get_address(), and init().