in optee-utee/src/net/optee.rs [168:182]
fn send(handle: &mut Self::Handle, buf: &[u8], timeout: u32) -> Result<usize, SocketError> {
let mut length: u32 = buf.len() as _;
let ret = unsafe {
((*raw::TEE_udpSocket).send)(
handle.0,
buf.as_ptr() as *const u8 as _,
&mut length,
timeout,
)
};
match ret {
raw::TEE_SUCCESS => Ok(length as usize),
_ => Err(handle_socket_operation_error(handle.0, ret)),
}
}