allowRogueTransfers() exposed in Publisher and Subscriber

This commit is contained in:
Pavel Kirienko
2015-04-06 19:21:01 +03:00
parent 7aa30e9cdc
commit 1a8757e54b
4 changed files with 20 additions and 0 deletions
@@ -60,6 +60,15 @@ public:
MonotonicDuration getTxTimeout() const { return tx_timeout_; }
void setTxTimeout(MonotonicDuration tx_timeout);
/**
* By default, attempt to send a transfer from passive mode will result in an error @ref ErrPassive.
* This option allows to enable sending rogue transfers from passive mode.
*/
void allowRogueTransfers()
{
sender_->allowRogueTransfers();
}
INode& getNode() const { return node_; }
};
@@ -196,6 +196,15 @@ protected:
return genericStart(&Dispatcher::registerServiceResponseListener);
}
/**
* By default, rogue transfers will be ignored.
* This option allows to enable reception of rogue transfers.
*/
void allowRogueTransfers()
{
forwarder_->allowRogueTransfers();
}
/**
* Terminate the subscription.
* Dispatcher core will remove this instance from the subscribers list.
@@ -87,6 +87,7 @@ public:
*/
using BaseType::init;
using BaseType::allowRogueTransfers;
using BaseType::getTransferSender;
using BaseType::getMinTxTimeout;
using BaseType::getMaxTxTimeout;
@@ -111,6 +111,7 @@ public:
return BaseType::startAsMessageListener();
}
using BaseType::allowRogueTransfers;
using BaseType::stop;
using BaseType::getFailureCount;
};