Kevent
public struct Kevent
Darwin only. Kevent represents a kqueue event to register or receive from Kqueue.poll. See kqueue(2).
-
The identifier of the event. Typically a file descriptor, but can be other things (e.g. signal number).
Declaration
Swift
public let identifier: Int
-
The filter associated with the identifier.
Declaration
Swift
public let filter: Filter
-
The flags for the event.
Declaration
Swift
public let flags: Flags
-
The filter-specific flags.
Declaration
Swift
public let filterFlags: FilterFlags
-
Filter-specific data associated with the event.
Declaration
Swift
public let data: Int
-
User-data associated with the event.
Declaration
Swift
public let userData: UserData
-
Creates a new kqueue event with all fields set to 0 or empty defaults. Typically used only to fill a [Kevent] to pass to Kqueue.poll.
Declaration
Swift
public init()
-
Creates a kqueue event for the provided file descriptor.
Declaration
Swift
public init(fd: FileDescriptor, filter: Filter = .read, flags: Flags = [.add], filterFlags: FilterFlags = [], data: Int = 0, userData: UserData = .u64(0))
-
Creates a kqueue event for the provided identifier.
Declaration
Swift
public init(identifier: Int, filter: Filter = .read, flags: Flags = [.add], filterFlags: FilterFlags = [], data: Int = 0, userData: UserData = .u64(0))
-
Creates a kqueue event for the provided signal.
Declaration
Swift
public init(signal: Signal, flags: Flags = [.add], userData: UserData = .u64(0))
-
Darwin only. Flags to configure a kqueue event.
See moreDeclaration
Swift
public struct Flags: OptionSet
-
Darwin only. Filter-specific flags.
See moreDeclaration
Swift
public struct FilterFlags: OptionSet