Function libaeron_sys::aeron_image_controlled_peek

source ยท
pub unsafe extern "C" fn aeron_image_controlled_peek(
    image: *mut aeron_image_t,
    initial_position: i64,
    handler: aeron_controlled_fragment_handler_t,
    clientd: *mut c_void,
    limit_position: i64
) -> i64
Expand description

Peek for new messages in a stream by scanning forward from an initial position. If new messages are found then they will be delivered to the handler up to a limited position.

Use a controlled fragment assembler to assemble messages which span multiple fragments. Scans must also start at the beginning of a message so that the assembler is reset.

@param image to peek. @param initial_position from which to peek forward. @param handler to which message fragments are delivered. @param clientd to pass to the handler. @param limit_position up to which can be scanned. @return the resulting position after the scan terminates which is a complete message or -1 for error.