### Interface

# Gio FileDescriptorBased

since: 2.24

#### Description

    interface Gio.FileDescriptorBased : GObject.Object

`GFileDescriptorBased` is an interface for file descriptor based IO.

It is implemented by streams (implementations of `GInputStream` or `GOutputStream`) that are based on file descriptors.

Note that `<gio/gfiledescriptorbased.h>` belongs to the UNIX-specific GIO interfaces, thus you have to use the `gio-unix-2.0.pc` pkg-config file or the `GioUnix-2.0` GIR namespace when using it.

Available since: 2.24

#### Prerequisite

In order to implement FileDescriptorBased, your type must inherit from`GObject`.

#### Implementations

- GUnixInputStream
- GUnixOutputStream

#### Instance methods

###### g_file_descriptor_based_get_fd

Gets the underlying file descriptor.

since: 2.24

#### Interface structure

    struct GioFileDescriptorBasedIface {
      GTypeInterface g_iface;
      int (* get_fd) (
        GFileDescriptorBased* fd_based
      );

    }

An interface for file descriptor based io objects.

###### Interface members

`g_iface` |
    GTypeInterface
| The parent interface.
`get_fd` |
    int (* get_fd) (
        GFileDescriptorBased* fd_based
      )
| Gets the underlying file descriptor.

#### Virtual methods

###### Gio.FileDescriptorBased.get_fd

Gets the underlying file descriptor.

since: 2.24