Function libaeron_sys::aeron_image_block_poll

source ยท
pub unsafe extern "C" fn aeron_image_block_poll(
    image: *mut aeron_image_t,
    handler: aeron_block_handler_t,
    clientd: *mut c_void,
    block_length_limit: usize
) -> c_int
Expand description

Poll for new messages in a stream. If new messages are found beyond the last consumed position then they will be delivered to the handler up to a limited number of bytes.

A scan will terminate if a padding frame is encountered. If first frame in a scan is padding then a block for the padding is notified. If the padding comes after the first frame in a scan then the scan terminates at the offset the padding frame begins. Padding frames are delivered singularly in a block.

Padding frames may be for a greater range than the limit offset but only the header needs to be valid so relevant length of the frame is data header length.

@param image to poll. @param handler to which block is delivered. @param clientd to pass to the handler. @param block_length_limit up to which a block may be in length. @return the number of bytes that have been consumed or -1 for error.