⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

UnixSocket

Struct UnixSocket 

Source
pub struct UnixSocket {
Show 13 fields pub id: u64, pub socket_type: UnixSocketType, pub state: UnixSocketState, pub path: Option<String>, pub peer_id: Option<u64>, pub recv_buffer: VecDeque<UnixMessage>, pub recv_buffer_max: usize, pub recv_buffer_used: usize, pub pending_connections: VecDeque<u64>, pub backlog: usize, pub shutdown_read: bool, pub shutdown_write: bool, pub owner_pid: u64,
}
Expand description

A Unix domain socket.

Fields§

§id: u64

Unique socket ID.

§socket_type: UnixSocketType

Socket type (stream or datagram).

§state: UnixSocketState

Current state.

§path: Option<String>

Bound path (None if unbound or anonymous).

§peer_id: Option<u64>

Peer socket ID (for connected stream sockets).

§recv_buffer: VecDeque<UnixMessage>

Receive buffer (incoming messages).

§recv_buffer_max: usize

Maximum receive buffer size in bytes.

§recv_buffer_used: usize

Current receive buffer size in bytes.

§pending_connections: VecDeque<u64>

Pending connection queue (for listening sockets).

§backlog: usize

Backlog limit for pending connections.

§shutdown_read: bool

Whether the socket has been shut down for reading.

§shutdown_write: bool

Whether the socket has been shut down for writing.

§owner_pid: u64

Owning process ID.

Auto Trait Implementations§

§

impl Freeze for UnixSocket

§

impl RefUnwindSafe for UnixSocket

§

impl Send for UnixSocket

§

impl Sync for UnixSocket

§

impl Unpin for UnixSocket

§

impl UnwindSafe for UnixSocket

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.