(cobra client and bots) add batch_size subscription option for retrieving multiple messages at once
This commit is contained in:
@ -562,11 +562,13 @@ namespace ix
|
||||
void CobraConnection::subscribe(const std::string& channel,
|
||||
const std::string& filter,
|
||||
const std::string& position,
|
||||
int batchSize,
|
||||
SubscriptionCallback cb)
|
||||
{
|
||||
// Create and send a subscribe pdu
|
||||
Json::Value body;
|
||||
body["channel"] = channel;
|
||||
body["batch_size"] = batchSize;
|
||||
|
||||
if (!filter.empty())
|
||||
{
|
||||
|
@ -88,6 +88,7 @@ namespace ix
|
||||
void subscribe(const std::string& channel,
|
||||
const std::string& filter = std::string(),
|
||||
const std::string& position = std::string(),
|
||||
int batchSize = 1,
|
||||
SubscriptionCallback cb = nullptr);
|
||||
|
||||
/// Unsubscribe from a channel
|
||||
|
Reference in New Issue
Block a user