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