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.
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.