add_unix_fd


Description:

[ Version ( since = "2.36" ) ]
public void* add_unix_fd (int fd, IOCondition events)

Monitors fd for the IO events in events.

The tag returned by this function can be used to remove or modify the monitoring of the fd using [ method@GLib.Source.remove_unix_fd] or [method@GLib.Source.modify_unix_fd].

It is not necessary to remove the file descriptor before destroying the source; it will be cleaned up automatically.

This API is only intended to be used by implementations of [struct@GLib.Source]. Do not call this API on a [struct@GLib.Source] that you did not create.

As the name suggests, this function is not available on Windows.

Parameters:

this

a source

fd

the file descriptor to monitor

events

an event mask

Returns:

an opaque tag