pub trait PlatformSocketHelpers {
// Required methods
fn set_non_blocking(sock: *const c_void) -> i8;
fn accept(sock_in: *const c_void, sock_out: *mut c_void) -> i8;
fn close(sock: *mut c_void);
fn wait_event(peers: *mut c_void, mutex: *mut c_void) -> i8;
}Expand description
Socket helper operations called by zenoh-pico’s transport layer.
Unprefixed method names: dispatch via
<ConcretePlatform as PlatformSocketHelpers>::set_non_blocking(...).
Note that the close method here is the socket-layer close (shutdown +
close) used by zenoh-pico’s generic helpers; PlatformTcp::close is the
TCP-specific close. Both exist because zenoh-pico’s C surface has both.
Required Methods§
Sourcefn set_non_blocking(sock: *const c_void) -> i8
fn set_non_blocking(sock: *const c_void) -> i8
Set socket to non-blocking mode.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.