pub struct Socket { /* private fields */ }Expand description
Create an endpoint for communication, equivalent to socket(2).
If the file_index argument is set, the resulting socket is
directly mapped to the given fixed-file slot instead of being
returned as a normal file descriptor. The application must first
have registered a file table, and the target slot should fit into
it.
Available since 5.19.
Implementations§
source§impl Socket
impl Socket
pub fn new(domain: i32, socket_type: i32, protocol: i32) -> Self
sourcepub const CODE: u8 = 45u8
pub const CODE: u8 = 45u8
The opcode of the operation. This can be passed to
Probe::is_supported to check if this operation is
supported with the current kernel.
pub const fn file_index(self, file_index: Option<DestinationSlot>) -> Self
pub const fn flags(self, flags: RwFlags) -> Self
pub fn build(self) -> Entry
Auto Trait Implementations§
impl RefUnwindSafe for Socket
impl Send for Socket
impl Sync for Socket
impl Unpin for Socket
impl UnwindSafe for Socket
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more