Changeset 3037 for source/ariba/communication
- Timestamp:
- Apr 22, 2009, 9:07:53 PM (16 years ago)
- Location:
- source/ariba/communication
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/communication/BaseCommunication.cpp
r2802 r3037 55 55 const BaseCommunication::LinkDescriptor BaseCommunication::LinkDescriptor::UNSPECIFIED; 56 56 57 BaseCommunication::BaseCommunication(const NetworkLocator* _locallocator, const uint16_t _listenport) 58 : messageReceiver( NULL ), currentSeqnum( 0 ), listenport( _listenport ) { 57 BaseCommunication::BaseCommunication() 58 : messageReceiver(NULL), network(NULL), transport(NULL){ 59 } 60 61 BaseCommunication::~BaseCommunication(){ 62 } 63 64 void BaseCommunication::start(const NetworkLocator* _locallocator, const uint16_t _listenport){ 65 66 currentSeqnum = 0; 67 listenport = _listenport; 59 68 60 69 logging_info( "starting up base communication and creating transports ..." ); … … 139 148 } 140 149 141 BaseCommunication::~BaseCommunication() {150 void BaseCommunication::stop() { 142 151 143 152 logging_info( "stopping base communication and transport ..." ); … … 210 219 // warn if this link has some queued messages attached 211 220 if( descriptor.waitingmsg.size() > 0 ){ 212 logging_warn( "dropping link " << link.toString() << 221 logging_warn( "dropping link " << link.toString() << 213 222 " that has " << descriptor.waitingmsg.size() << " waiting messages" ); 214 223 } … … 368 377 const NetworkLocator* remoteLocator = dynamic_cast<const NetworkLocator*>(message->getSourceAddress()); 369 378 370 logging_debug( "localLocator=" << localLocator->toString() 379 logging_debug( "localLocator=" << localLocator->toString() 371 380 << " remoteLocator=" << remoteLocator->toString()); 372 381 … … 419 428 // the link is now open 420 429 // 421 430 422 431 BOOST_FOREACH( CommunicationEvents* i, eventListener ){ 423 432 i->onLinkUp( localLink, localLocator, remoteLocator ); … … 444 453 445 454 linkDesc.remoteLink = spovmsg->getLocalLink(); 446 linkDesc.linkup = true; 447 455 linkDesc.linkup = true; 456 448 457 logging_debug( "the link is now up with local link id " << spovmsg->getRemoteLink().toString() ); 449 458 … … 452 461 } 453 462 454 if( linkDesc.waitingmsg.size() > 0 ){ 463 if( linkDesc.waitingmsg.size() > 0 ){ 455 464 logging_info( "sending out queued messages on link " << linkDesc.localLink.toString() ); 456 465 … … 564 573 for( ; i != iend; i++){ 565 574 if( (*i).localLink != localLink) continue; 566 575 567 576 BOOST_FOREACH( Message* msg, i->waitingmsg ){ 568 577 delete msg; -
source/ariba/communication/BaseCommunication.h
r2483 r3037 122 122 */ 123 123 class BaseCommunication : public MessageReceiver, NetworkChangeInterface { 124 125 124 use_logging_h(BaseCommunication); 126 127 125 public: 128 /** 129 * Constructs a Base Communication instance. 130 * Listens default on port number 41402 131 */ 132 BaseCommunication(const NetworkLocator* _locallocator, const uint16_t _listenport); 133 134 /** 135 * Destructs a Base Communication instance 126 127 /** 128 * Default ctor that just creates an empty 129 * non functional base communication 130 */ 131 BaseCommunication(); 132 133 /** 134 * Default dtor that does nothing 136 135 */ 137 136 virtual ~BaseCommunication(); 137 138 /** 139 * Startup the base communication, start modules etc. 140 */ 141 void start(const NetworkLocator* _locallocator, const uint16_t _listenport); 142 143 /** 144 * stop the base communication, stop modules etc. 145 */ 146 void stop(); 138 147 139 148 /** -
source/ariba/communication/EndpointDescriptor.cpp
r2457 r3037 57 57 58 58 EndpointDescriptor::EndpointDescriptor(const Locator* _locator){ 59 if( _locator == NULL ) return; 60 59 61 locator = new IPv4Locator(*dynamic_cast<IPv4Locator*>((Locator*)_locator)); 60 62 isUnspec = false; -
source/ariba/communication/EndpointDescriptor.h
r3036 r3037 51 51 using ariba::communication::IPv4Locator; 52 52 53 // needed for friend decleration54 // in different namespace55 namespace ariba {56 namespace interface {57 class UnderlayAbstraction;58 }}59 60 53 namespace ariba { 61 54 namespace communication { … … 67 60 68 61 friend class BaseCommunication; 69 friend class ariba::interface::UnderlayAbstraction;70 62 71 63 public:
Note:
See TracChangeset
for help on using the changeset viewer.