Skip to main content

async_queue_packet

Function async_queue_packet 

Source
pub unsafe extern "C" fn async_queue_packet(
    dispatcher: *mut async_dispatcher_t,
    receiver: *mut async_receiver_t,
    data: *const zx_packet_user_t,
) -> zx_status_t
Expand description

Enqueues a packet of data for delivery to a receiver.

The |data| will be copied into the packet. May be NULL to create a zero-initialized packet payload.

Returns |ZX_OK| if the packet was successfully enqueued. Returns |ZX_ERR_BAD_STATE| if the dispatcher is shutting down. Returns |ZX_ERR_NOT_SUPPORTED| if not supported by the dispatcher.

This operation is thread-safe.