Skip to content

End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

class method

Socket::AncillaryData.unix_rights

Socket::AncillaryData.unix_rights(io1, io2, ...) => ancillarydata

Creates a new Socket::AncillaryData object which contains file descriptors as data.

Example
p Socket::AncillaryData.unix_rights(STDERR)
#=> #<Socket::AncillaryData: UNIX SOCKET RIGHTS 2>
See also #unix_rights .new #cmsg_is? .ipv6_pktinfo also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.0