Gio.UnixConnection.prototype.send_fd
function send_fd(fd: Number(gint), cancellable: Gio.Cancellable): Boolean {
// Gjs wrapper for g_unix_connection_send_fd()
}
Passes a file descriptor to the receiving side of the connection. The receiving end has to call Gio.UnixConnection.prototype.receive_fd to accept the file descriptor.
As well as sending the fd this also writes a single byte to the stream, as this is required for fd passing to work on some implementations.
Since 2.22
- fd
a file descriptor
- cancellable
optional Gio.Cancellable object, null to ignore.
- Returns
a true on success, null on error.