Please find attached a pull request where the following changes were made:
1) RawFd was replaced in favor of OwnedFd. The nix crate is no longer accepts the RawFd as argument and requires the BorrowedFd to be passed as argument.
OwnedFd is:
An owned file descriptor.
This closes the file descriptor on drop. It is guaranteed that nobody else will close the file descriptor.
This uses repr(transparent) and has the representation of a host file descriptor, so it can be used in FFI in places where a file descriptor is passed as a consumed argument or returned as an owned value, and it never has the value -1.
You can use AsFd::as_fd to obtain a BorrowedFd.
2) Updated the crates versions. This is not necessary, but this crate forces to download additional dependencies.
3) Added a function "send_flags" in "UnixSeqpacketConn". + impl AsFd and commented out the impl Drop (as OwnedFd should close the socket).
4) Removed unused import.
Hello,
Please find attached a pull request where the following changes were made: 1) RawFd was replaced in favor of OwnedFd. The nix crate is no longer accepts the RawFd as argument and requires the BorrowedFd to be passed as argument. OwnedFd is:
2) Updated the crates versions. This is not necessary, but this crate forces to download additional dependencies. 3) Added a function "send_flags" in "UnixSeqpacketConn". + impl AsFd and commented out the impl Drop (as OwnedFd should close the socket). 4) Removed unused import.
Tested with default features on GNU/Linux.