#[no_mangle]
pub extern "C" fn hyper_io_new() -> *mut hyper_io
Available on crate feature
ffi
and hyper_unstable_ffi
only.Expand description
Create a new IO type used to represent a transport.
The read and write functions of this transport should be set with
hyper_io_set_read
and hyper_io_set_write
.
It is expected that the underlying transport is non-blocking. When
a read or write callback can’t make progress because there is no
data available yet, it should use the hyper_waker
mechanism to
arrange to be called again when data is available.
To avoid a memory leak, the IO handle must eventually be consumed by
hyper_io_free
or hyper_clientconn_handshake
.