(cobra client) can subscribe with a position
This commit is contained in:
@ -565,6 +565,7 @@ namespace ix
|
||||
|
||||
void CobraConnection::subscribe(const std::string& channel,
|
||||
const std::string& filter,
|
||||
const std::string& position,
|
||||
SubscriptionCallback cb)
|
||||
{
|
||||
// Create and send a subscribe pdu
|
||||
@ -576,6 +577,11 @@ namespace ix
|
||||
body["filter"] = filter;
|
||||
}
|
||||
|
||||
if (!position.empty())
|
||||
{
|
||||
body["position"] = position;
|
||||
}
|
||||
|
||||
Json::Value pdu;
|
||||
pdu["action"] = "rtm/subscribe";
|
||||
pdu["body"] = body;
|
||||
|
@ -98,6 +98,7 @@ namespace ix
|
||||
// message arrives.
|
||||
void subscribe(const std::string& channel,
|
||||
const std::string& filter = std::string(),
|
||||
const std::string& position = std::string(),
|
||||
SubscriptionCallback cb = nullptr);
|
||||
|
||||
/// Unsubscribe from a channel
|
||||
|
Reference in New Issue
Block a user