1 use core::fmt::Debug; 2 3 use crate::syscall::SystemError; 4 5 pub trait Socket: Sync + Send + Debug { 6 fn read(&self, buf: &mut [u8]) -> Result<usize, SystemError>; 7 8 fn write(&self, buf: &[u8]) -> Result<usize, SystemError>; 9 } 10