pub fn new_file(kernel: &Kernel, socket: SocketHandle, open_flags: OpenFlags) -> FileHandle {
        let fs = socket_fs(kernel);
        let mode = mode!(IFSOCK, 0o777);
        let node = fs.create_node(Box::new(Anon), mode);
        node.set_socket(socket.clone());
        FileObject::new_anonymous(SocketFile::new(socket), node, open_flags)
    }
/// Creates a `FileHandle` where the associated `FsNode` contains a socket.
///
/// # Parameters
/// - `kernel`: The kernel that is used to fetch `SocketFs`, to store the created socket node.
/// - `socket`: The socket to store in the `FsNode`.
/// - `open_flags`: The `OpenFlags` which are used to create the `FileObject`.
Creates a `FileHandle` where the associated `FsNode` contains a socket.
Creates a ` FileHandle ` where the associated ` FsNode ` contains a socket .
pub fn new_file(kernel: &Kernel, socket: SocketHandle, open_flags: OpenFlags) -> FileHandle {
        let fs = socket_fs(kernel);
        let mode = mode!(IFSOCK, 0o777);
        let node = fs.create_node(Box::new(Anon), mode);
        node.set_socket(socket.clone());
        FileObject::new_anonymous(SocketFile::new(socket), node, open_flags)
    }
pub fn new_file ( kernel : & Kernel , socket : SocketHandle , open_flags : OpenFlags ) -> FileHandle { let fs = socket_fs ( kernel ) ; let mode = mode ! ( IFSOCK 0o777 ) ; let node = fs . create_node ( Box :: new ( Anon ) , mode ) ; node . set_socket ( socket . clone ( ) ) ; FileObject :: new_anonymous ( SocketFile :: new ( socket ) , node , open_flags ) }
Creates a `FileHandle` where the associated `FsNode` contains a socket.
Creates a ` FileHandle ` where the associated ` FsNode ` contains a socket .
kernel
&Kernel
socket
SocketHandle
open_flags
OpenFlags
kernel
&Kernel
The kernel that is used to fetch `SocketFs`, to store the created socket node.
The kernel that is used to fetch ` SocketFs ` to store the created socket node .
socket
SocketHandle
The socket to store in the `FsNode`.
The socket to store in the ` FsNode ` .
open_flags
OpenFlags
The `OpenFlags` which are used to create the `FileObject`.
The ` OpenFlags ` which are used to create the ` FileObject ` .