#include <MulticastLoader.h>
Public Member Functions | |
virtual int | init (int argc, ACE_TCHAR *argv[]) |
Definition at line 20 of file MulticastLoader.h.
int OpenDDS::DCPS::MulticastLoader::init | ( | int | argc, | |
ACE_TCHAR * | argv[] | |||
) | [virtual] |
Definition at line 32 of file MulticastLoader.cpp.
References OpenDDS::DCPS::TransportRegistry::create_inst(), OpenDDS::DCPS::TransportRegistry::DEFAULT_CONFIG_NAME, OpenDDS::DCPS::TransportRegistry::DEFAULT_INST_PREFIX, OpenDDS::DCPS::TransportRegistry::get_config(), OpenDDS::DCPS::RcHandle< T >::in(), MULTICAST_NAME, OpenDDS::DCPS::TransportRegistry::register_type(), and TheTransportRegistry.
00033 { 00034 static bool initialized(false); 00035 00036 if (initialized) return 0; // already initialized 00037 00038 TransportRegistry* registry = TheTransportRegistry; 00039 registry->register_type(new MulticastType); 00040 TransportConfig_rch cfg = 00041 registry->get_config(TransportRegistry::DEFAULT_CONFIG_NAME); 00042 00043 TransportInst_rch default_unrel = 00044 registry->create_inst(TransportRegistry::DEFAULT_INST_PREFIX 00045 + std::string("0410_MCAST_UNRELIABLE"), 00046 MULTICAST_NAME); 00047 MulticastInst* mi = dynamic_cast<MulticastInst*>(default_unrel.in()); 00048 mi->reliable_ = false; 00049 cfg->sorted_insert(default_unrel); 00050 00051 TransportInst_rch default_rel = 00052 registry->create_inst(TransportRegistry::DEFAULT_INST_PREFIX 00053 + std::string("0420_MCAST_RELIABLE"), MULTICAST_NAME); 00054 cfg->sorted_insert(default_rel); 00055 00056 initialized = true; 00057 00058 return 0; 00059 }