INNER CODE UNIT · Rust

new

domcyrus/rustnet · crates/rustnet-host/src/lib.rs:138

    pub fn new(pid: u32, name: impl Into<String>, uid: Option<u32>) -> Self {
        Self {
            pid,
            name: name.into(),
            uid,
        }
    }
}

/// One socket returned by the host operating system.
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct HostSocket {
    pub protocol: Protocol,
    pub local_addr: SocketAddr,
    /// TCP listeners and unconnected UDP endpoints have no remote peer.
    pub remote_addr: Option<SocketAddr>,
    pub state: HostSocketState,
    /// Missing when the platform does not expose an owner or permissions hide

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…