Channels
The functions allowing to receive data in synchronous mode, without a callback
-
inline std::pair<zenoh::ClosureReplyChannelSend, zenoh::ClosureReplyChannelRecv> zenoh::reply_fifo_new(uintptr_t bound)
Create a new blocking fifo channel.
- Parameters:
bound – the maximum number of replies that can be stored in the channel. 0 means unbounded
- Returns:
a pair of closures:
ClosureReplyChannelSend
andClosureReplyChannelRecv
ClosureReplyChannelSend
should be passed as callback to aSession::get
callClosureReplyChannelRecv
is a synchronous closure to be called from user code. It will block until either azenoh::Reply
is available, which it will then return; or until theClosureReplyChannelSend
closure is dropped and all replies have been consumed, at which point it will return an invalidatedzenoh::Reply
and so will further calls.
Note
zenoh-c only
-
inline std::pair<zenoh::ClosureReplyChannelSend, zenoh::ClosureReplyChannelRecv> zenoh::reply_non_blocking_fifo_new(uintptr_t bound)
Create a new non-blocking fifo channel.
- Parameters:
bound – the maximum number of replies that can be stored in the channel
- Returns:
a pair of closures:
ClosureReplyChannelSend
andClosureReplyChannelRecv
ClosureReplyChannelSend
should be passed as callback to aSession::get
callClosureReplyChannelRecv
is a synchronous closure to be called from user code. It will block until either azenoh::Reply
is available, which it will then return; or until theClosureReplyChannelSend
closure is dropped and all replies have been consumed, at which point it will return an invalidatedzenoh::Reply
and so will further calls.
Note
zenoh-c only