In IO::CatHandle§

See primary documentation in context for method native-descriptor

method native-descriptor(IO::CatHandle:D: --> Int:D)

Returns the native-descriptor of the currently active source handle or Nil if the source handle queue has been exhausted.

Since the CatHandle closes a source handle, once it's done with it, it's possible for successive source handles to have the same native descriptor, if they were passed to .new as Cool or IO::Path objects.

(my $f1 = 'foo'.IO).spurt: 'foo';
(my $f2 = 'bar'.IO).spurt: 'bar';
with IO::CatHandle.new: $f1, $f2, $*IN {
    repeat { .native-descriptor.say } while .next-handle;
    # OUTPUT: «13␤13␤9␤»
}

In IO::Socket::Async§

See primary documentation in context for method native-descriptor

method native-descriptor(--> Int)

Returns the file descriptor of this socket.

In IO::Handle§

See primary documentation in context for method native-descriptor

method native-descriptor(IO::Handle:D:)

This returns a value that the operating system would understand as a "file descriptor" and is suitable for passing to a native function that requires a file descriptor as an argument such as fcntl or ioctl.

In IO::Socket::Async::ListenSocket§

See primary documentation in context for method native-descriptor

method native-descriptor(--> Int)

Returns the corresponding file descriptor (SOCKET on Windows) for the listening socket.

In role IO::Socket§

See primary documentation in context for method native-descriptor

method native-descriptor()

This returns a value that the operating system would understand as a "socket descriptor" and is suitable for passing to a native function that requires a socket descriptor as an argument such as setsockopt.