/// Creates a new unbound socket.
///
/// # Parameters
/// - `domain`: The domain of the socket (e.g., `AF_UNIX`).
Creates a new unbound socket.
Creates a new unbound socket .
pub fn new(domain: SocketDomain, socket_type: SocketType) -> SocketHandle {
        Arc::new(Socket {
            ops: create_socket_ops(domain, socket_type),
            domain,
            socket_type,
            inner: Mutex::new(SocketInner {
                messages: MessageQueue::new(SOCKET_DEFAULT_SIZE),
                waiters: WaitQueue::default(),
                address: None,
                receive_timeout: None,
                send_timeout: None,
                linger: uapi::linger::default(),
                credentials: None,
                state: SocketState::Disconnected,
            }),
        })
    }
pub fn new ( domain : SocketDomain , socket_type : SocketType ) -> SocketHandle { Arc :: new ( Socket { ops : create_socket_ops ( domain , socket_type ) , domain , socket_type , inner : Mutex :: new ( SocketInner { messages : MessageQueue :: new ( SOCKET_DEFAULT_SIZE ) , waiters : WaitQueue :: default ( ) , address : None , receive_timeout : None , send_timeout : None , linger : uapi :: linger :: default ( ) , credentials : None , state : SocketState :: Disconnected , } ) , } ) }
Creates a new unbound socket.
Creates a new unbound socket .
domain
SocketDomain
The domain of the socket .
The domain of the socket .
socket_type
SocketType