Function

Dexfd_watch

unstable since: 1.1

Declaration [src]

DexFuture*
dex_fd_watch (
  int fd,
  int events
)

Description [src]

Creates a new GSource that will fire when events is satisfied.

This is primarily useful when integrating with legacy systems on a fiber.

Available since: 1.1

Parameters

fd

Type: int

A file-descriptor.

events

Type: int

The POLLOUT|POLLIN style bitmask to watch for.

Return value

Type: DexFuture

A DexFuture that resolves to the revents value when events is satisfied.

The caller of the function takes ownership of the data, and is responsible for freeing it.