xref: /DragonOS/kernel/src/net/mod.rs (revision 4454d1a2dd1f1078750151c028a794cfd9a04a1b)
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