GLib.PollFunc

function onPollFunc(ufds: GLib.PollFD, nfsd: Number(guint), timeout_: Number(gint)): Number(gint) {
}
  

Specifies the type of function passed to GLib.MainContext.set_poll_func. The semantics of the function should match those of the poll() system call.

ufds

an array of GLib.PollFD elements

nfsd

the number of elements in ufds

timeout_

the maximum time to wait for an event of the file descriptors. A negative value indicates an infinite timeout.

Returns

the number of GLib.PollFD elements which have events or errors reported, or -1 if an error occurred.