UnixConnection.receiveFd

Receives a file descriptor from the sending end of the connection. The sending end has to call UnixConnection.sendFd for this to work.

As well as reading the fd this also reads a single byte from the stream, as this is required for fd passing to work on some implementations.

class UnixConnection
int
receiveFd

Parameters

cancellable Cancellable

optional gio.Cancellable object, NULL to ignore

Return Value

Type: int

a file descriptor on success, -1 on error.

Throws

GException on failure.

Meta

Since

2.22