Function hyper::ffi::hyper_io_set_write[][src]

#[no_mangle]
pub extern "C" fn hyper_io_set_write(
    io: *mut hyper_io,
    func: extern "C" fn(_: *mut c_void, _: *mut hyper_context<'_>, _: *const u8, _: size_t) -> size_t
)
Expand description

Set the write function for this IO transport.

Data from the buf pointer should be written to the transport, up to buf_len bytes. The number of bytes written should be the return value.

If no data can currently be written, the waker should be cloned and registered with whatever polling mechanism is used to signal when data is available later on. The return value should be HYPER_IO_PENDING.

Yeet.

If there is an irrecoverable error reading data, then HYPER_IO_ERROR should be the return value.