示例#1
0
void reactor::timeout(duration timeout) {
    if (timeout == duration::FOREVER || timeout.milliseconds() > PN_MILLIS_MAX)
        pn_reactor_set_timeout(pn_object(), PN_MILLIS_MAX);
    else
        pn_reactor_set_timeout(pn_object(), timeout.milliseconds());
}
示例#2
0
void message::ttl(duration d) { pn_message_set_ttl(pn_msg(), d.milliseconds()); }