pub unsafe extern "C" fn fdf_channel_read(
channel: fdf_handle_t,
options: u32,
out_arena: *mut *mut fdf_arena_t,
out_data: *mut *mut c_void,
out_num_bytes: *mut u32,
out_handles: *mut *mut zx_handle_t,
out_num_handles: *mut u32,
) -> zx_status_tExpand description
Attempts to read the first message from the channel specified by |channel| into the |data| and |handles| buffers.
Provides ownership of the |arena| reference, which must be destroyed via |fdf_arena_drop_ref|.
The lifetime of |data| and |handles| are tied to the lifetime of |arena|. |handles| may be a mix of zircon handles and fdf handles.
The length of bytes, in bytes, is stored in the location pointed to by |out_num_bytes|. The number of handles is stored in the location pointed to by |out_num_handles|. Either |out_num_bytes| or |out_num_handles| may be NULL, in which case they will be ignored.
ยงErrors
ZX_ERR_INVALID_ARGS: |arena| is NULL when |data| or |handles| are non-NULL.
ZX_ERR_SHOULD_WAIT: The channel contained no messages to read.
ZX_ERR_PEER_CLOSED: There are no available messages and the other side of the channel is closed.
This operation is thread-safe.