Class

DispatchIO

DispatchIO provides a channel to perform operations on file descriptor using either stream-based and random-access semantics for accessing the contents of a file descriptor.

Topics

Initializers

init(__type: UInt, fd: Int32, queue: DispatchQueue, handler: (Int32) -> Void)

Creates a dispatch I/O channel and associates it with the specified file descriptor.

init(__type: UInt, io: DispatchIO, queue: DispatchQueue, handler: (Int32) -> Void)

Creates a new dispatch I/O channel from an existing channel.

init(type: DispatchIO.StreamType, fileDescriptor: Int32, queue: DispatchQueue, cleanupHandler: (Int32) -> Void)

Creates a new I/O channel with certain access semantics for a given file descriptor using a specified dispatch queue and cleanup handler.

init(type: DispatchIO.StreamType, io: DispatchIO, queue: DispatchQueue, cleanupHandler: (Int32) -> Void)

Creates a new I/O channel with certain access semantics from an existing I/O channel using a specified dispatch queue and cleanup handler.

Instance Properties

var fileDescriptor: Int32

Returns the file descriptor associated with the specified channel.

Instance Methods

Structures

struct DispatchIO.CloseFlags

The semantics of closing an I/O channel.

Enumerations

enum DispatchIO.StreamType

The semantics for accessing the contents of a file descriptor.

Relationships

Inherits From

See Also

Managing Dispatch I/O

enum DispatchIO.StreamType

The semantics for accessing the contents of a file descriptor.

struct DispatchIO.CloseFlags

The semantics of closing an I/O channel.

Dispatch I/O Channel Types

The types of dispatch I/O channels that may be created.

Dispatch I/O Channel Closing Options

The options to use when closing a dispatch I/O channel.

Dispatch I/O Channel Configuration Options

The options to use when configuring a channel.