Instance Property

fileDescriptor

Returns the file descriptor associated with the specified channel.

Declaration

var fileDescriptor: Int32 { get }

Parameters

channel

The channel whose file descriptor you want to retrieve.

Return Value

The file descriptor associated with the channel or -1 if the file descriptor is closed or not yet open.

Discussion

If the path name associated with the channel has not yet been opened, calling this function does not normally open the corresponding file, with one exception. If you call the function from a barrier block scheduled on the channel, the function does open the file and return the resulting file descriptor.

See Also

Managing the File Descriptor

func setLimit(highWater: Int)

Sets the maximum number of bytes to process before enqueueing a handler block.

func setLimit(lowWater: Int)

Sets the minimum number of bytes to process before enqueueing a handler block.

func setInterval(interval: DispatchTimeInterval, flags: DispatchIO.IntervalFlags)

Sets the interval, in nanoseconds, at which to invoke the I/O handlers for the channel.