PollFd

constructor()(source)

Allocate a new PollFd.

This instance will be allocated on the native heap and automatically freed when this class instance is garbage collected.


constructor(scope: <Error class: unknown class>)(source)

Allocate a new PollFd using the provided AutofreeScope.

The AutofreeScope manages the allocation lifetime. The most common usage is with memScoped.

Parameters

scope

The AutofreeScope to allocate this structure in.


constructor(fd: <Error class: unknown class>, events: <Error class: unknown class>, revents: <Error class: unknown class>)(source)

Allocate a new PollFd.

This instance will be allocated on the native heap and automatically freed when this class instance is garbage collected.

Parameters

fd

the file descriptor to poll (or a HANDLE on Win32)

events

a bitwise combination from #GIOCondition, specifying which events should be polled for. Typically for reading from a file descriptor you would use %G_IO_IN | %G_IO_HUP | %G_IO_ERR, and for writing you would use %G_IO_OUT | %G_IO_ERR.

revents

a bitwise combination of flags from #GIOCondition, returned from the poll() function to indicate which events occurred.


constructor(fd: <Error class: unknown class>, events: <Error class: unknown class>, revents: <Error class: unknown class>, scope: <Error class: unknown class>)(source)

Allocate a new PollFd using the provided AutofreeScope.

The AutofreeScope manages the allocation lifetime. The most common usage is with memScoped.

Parameters

fd

the file descriptor to poll (or a HANDLE on Win32)

events

a bitwise combination from #GIOCondition, specifying which events should be polled for. Typically for reading from a file descriptor you would use %G_IO_IN | %G_IO_HUP | %G_IO_ERR, and for writing you would use %G_IO_OUT | %G_IO_ERR.

revents

a bitwise combination of flags from #GIOCondition, returned from the poll() function to indicate which events occurred.

scope

The AutofreeScope to allocate this structure in.


constructor(glibPollFdPointer: <Error class: unknown class><<Error class: unknown class>>)(source)