pub struct Socket {
pub owner: ProcId,
pub proto: Proto,
pub family: Family,
pub state: SockState,
pub local: Option<Endpoint>,
pub remote: Option<Peer>,
pub path: Option<String>,
pub peer_path: Option<String>,
pub handle: Option<u64>,
pub peer_handle: Option<u64>,
pub stale: bool,
}Expand description
One socket held by a process (current user’s processes, own network namespace).
Fields§
§owner: ProcId§proto: Proto§family: Family§state: SockState§local: Option<Endpoint>§remote: Option<Peer>§path: Option<String>Unix: the bound path (or abstract name, prefixed @).
peer_path: Option<String>Unix: path of the socket this one is connected to (macOS).
handle: Option<u64>Opaque kernel handle (macOS pcb, Linux inode), for de-duplicating a socket shared by several processes and for unix peer matching. Never exported.
peer_handle: Option<u64>Opaque kernel handle of the connected peer (macOS unix sockets). Never exported.
stale: boolRead in an earlier sample of the rotation (SPEC §6.2), not this one.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Socket
impl<'de> Deserialize<'de> for Socket
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Socket
Auto Trait Implementations§
impl Forget for Socket
impl Freeze for Socket
impl Move for Socket
impl RefUnwindSafe for Socket
impl Send for Socketwhere
RawVecInner: Send,
impl Sync for Socketwhere
RawVecInner: Sync,
impl Unpin for Socket
impl UnsafeUnpin for Socket
impl UnwindSafe for Socketwhere
RawVecInner: UnwindSafe,
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