예제 #1
0
std::vector<msg_on_chan> get_all_msg_on_chan(context const&pb)
{
    std::vector<msg_on_chan> result;
    for (;;) {
        msg_on_chan got(pb.get(), pb.get_channel());
        if (got.message().empty() && got.channel().empty()) {
            break;
        }
        result.emplace_back(got);
    }
    return result;
}
예제 #2
0
 /// Returns whether the given message was received on the given
 /// channel on the context
 inline bool got_message_on_channel(context const &pb, msg_on_chan expected) {
     pubnub::msg_on_chan got(pb.get(), pb.get_channel());
     return got == expected;
 }